repo_id stringlengths 5 115 | size int64 590 5.01M | file_path stringlengths 4 212 | content stringlengths 590 5.01M |
|---|---|---|---|
yvemula/COMP-ORG | 1,114 | fibonacci.asm.s | ; Assembly code translation
100: LOAD 110E ; Load the value at memory address 110E into the accumulator
101: LOAD 110C ; Load FibNo (at address 110C) into the accumulator
102: ADD 210F ; Add the value at address 210F (Neg1) to the accumulator
103: STORE 310D ; Store the current accumulator value int... |
ze-gois/rust_template_x86_64 | 1,098 | src/start.s | .text
.align 4
.globl _start
.hidden _start
.section .text._start
.type _start,@function
_start:
# Store the original stack pointer
mov %rsp, %rdi
# Always ensure 16-byte alignment
and $-16, %rsp
# Create a standard stack frame
push %rbp
... |
ze-gois/rust_userspace_build | 1,120 | src/start.s | .text
.align 4
.globl _start
.hidden _start
.section .text._start
.type _start,@function
_start:
# Store the original stack pointer
mov %rsp, %rdi
# Always ensure 16-byte alignment
and $-16, %rsp
# Create a standard stack frame
push %rbp
... |
ze-gois/rust_template_x86_64 | 1,098 | src/start.s | .text
.align 4
.globl _start
.hidden _start
.section .text._start
.type _start,@function
_start:
# Store the original stack pointer
mov %rsp, %rdi
# Always ensure 16-byte alignment
and $-16, %rsp
# Create a standard stack frame
push %rbp
... |
ze-gois/rust_userspace_build | 1,120 | src/start.s | .text
.align 4
.globl _start
.hidden _start
.section .text._start
.type _start,@function
_start:
# Store the original stack pointer
mov %rsp, %rdi
# Always ensure 16-byte alignment
and $-16, %rsp
# Create a standard stack frame
push %rbp
... |
zhanhc21/2024_spring_OS_RCORE | 2,008 | os/src/trap/trap.S | .altmacro
.macro SAVE_GP n
sd x\n, \n*8(sp)
.endm
.macro LOAD_GP n
ld x\n, \n*8(sp)
.endm
.section .text.trampoline
.globl __alltraps
.globl __restore
.align 2
__alltraps:
csrrw sp, sscratch, sp
# now sp->*TrapContext in user space, sscratch->user stack
# save other general purpose r... |
zhitian111/WaterOS | 61,996 | references/rme_platform_a7a_gcc.s | /******************************************************************************
Filename : platform_A7A_asm.s
Author : pry
Date : 19/01/2017
Description : The Cortex-A (ARMv7) assembly support of the RME RTOS.
We don't seek to support AFE or TRE on this architecture for RME.
T... |
zhitian111/WaterOS | 7,715 | src/asm/riscv/wateros_platform_riscv64_gcc.S | /* 该文件中存储而是 RISC-V 64 架构下的操作系统启动前的准备工作的代码,
包括设置栈指针、设置页表、调用 Rust 程序的入口函数等。 */
/* 段定义: .text.entry */
.section .text.entry
/* 符号导出 */
.globl _start
.globl boot_stack_lower_bound
.globl boot_stack_top
.global sigreturn_trampoline
.global setup_vm
/* 系统宏定义 */
#define STACK_SIZE_LOG2 16
#define STACK... |
ZhiyuanSue/Component-Microkernel | 1,598 | modules/axhal/linker.lds.S | OUTPUT_ARCH(%ARCH%)
BASE_ADDRESS = %KERNEL_BASE%;
ENTRY(_start)
SECTIONS
{
. = BASE_ADDRESS;
_skernel = .;
.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
. = ALIGN(4K);
_etext = .;
}
.rodata : ALIGN(4K) {
_srodata = .;
*(.ro... |
ZhiyuanSue/Component-Microkernel | 4,307 | modules/axhal/src/platform/x86_pc/multiboot.S | # Bootstrapping from 32-bit with the Multiboot specification.
# See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
.section .text.boot
.code32
.global _start
_start:
mov edi, eax # arg1: magic: 0x2BADB002
mov esi, ebx # arg2: multiboot info
jmp bsp_entry32
.bal... |
ZhiyuanSue/Component-Microkernel | 1,965 | modules/axhal/src/platform/x86_pc/ap_start.S | # Boot application processors into the protected mode.
# Each non-boot CPU ("AP") is started up in response to a STARTUP
# IPI from the boot CPU. Section B.4.2 of the Multi-Processor
# Specification says that the AP will start in real mode with CS:IP
# set to XY00:0000, where XY is an 8-bit value sent with the
# STAR... |
ZhiyuanSue/Component-Microkernel | 1,505 | modules/axhal/src/arch/x86_64/trap.S | .equ NUM_INT, 256
.altmacro
.macro DEF_HANDLER, i
.Ltrap_handler_\i:
.if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17
# error code pushed by CPU
push \i # interrupt vector
jmp .Ltrap_common
.else
push 0 # fill in error code in TrapFrame
push \i # interrupt ... |
zhanhc21/2024_spring_OS_RCORE | 2,008 | os/src/trap/trap.S | .altmacro
.macro SAVE_GP n
sd x\n, \n*8(sp)
.endm
.macro LOAD_GP n
ld x\n, \n*8(sp)
.endm
.section .text.trampoline
.globl __alltraps
.globl __restore
.align 2
__alltraps:
csrrw sp, sscratch, sp
# now sp->*TrapContext in user space, sscratch->user stack
# save other general purpose r... |
zhitian111/WaterOS | 61,996 | references/rme_platform_a7a_gcc.s | /******************************************************************************
Filename : platform_A7A_asm.s
Author : pry
Date : 19/01/2017
Description : The Cortex-A (ARMv7) assembly support of the RME RTOS.
We don't seek to support AFE or TRE on this architecture for RME.
T... |
zhitian111/WaterOS | 7,715 | src/asm/riscv/wateros_platform_riscv64_gcc.S | /* 该文件中存储而是 RISC-V 64 架构下的操作系统启动前的准备工作的代码,
包括设置栈指针、设置页表、调用 Rust 程序的入口函数等。 */
/* 段定义: .text.entry */
.section .text.entry
/* 符号导出 */
.globl _start
.globl boot_stack_lower_bound
.globl boot_stack_top
.global sigreturn_trampoline
.global setup_vm
/* 系统宏定义 */
#define STACK_SIZE_LOG2 16
#define STACK... |
ZhiyuanSue/Component-Microkernel | 1,598 | modules/axhal/linker.lds.S | OUTPUT_ARCH(%ARCH%)
BASE_ADDRESS = %KERNEL_BASE%;
ENTRY(_start)
SECTIONS
{
. = BASE_ADDRESS;
_skernel = .;
.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
. = ALIGN(4K);
_etext = .;
}
.rodata : ALIGN(4K) {
_srodata = .;
*(.ro... |
ZhiyuanSue/Component-Microkernel | 4,307 | modules/axhal/src/platform/x86_pc/multiboot.S | # Bootstrapping from 32-bit with the Multiboot specification.
# See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
.section .text.boot
.code32
.global _start
_start:
mov edi, eax # arg1: magic: 0x2BADB002
mov esi, ebx # arg2: multiboot info
jmp bsp_entry32
.bal... |
ZhiyuanSue/Component-Microkernel | 1,965 | modules/axhal/src/platform/x86_pc/ap_start.S | # Boot application processors into the protected mode.
# Each non-boot CPU ("AP") is started up in response to a STARTUP
# IPI from the boot CPU. Section B.4.2 of the Multi-Processor
# Specification says that the AP will start in real mode with CS:IP
# set to XY00:0000, where XY is an 8-bit value sent with the
# STAR... |
ZhiyuanSue/Component-Microkernel | 1,505 | modules/axhal/src/arch/x86_64/trap.S | .equ NUM_INT, 256
.altmacro
.macro DEF_HANDLER, i
.Ltrap_handler_\i:
.if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17
# error code pushed by CPU
push \i # interrupt vector
jmp .Ltrap_common
.else
push 0 # fill in error code in TrapFrame
push \i # interrupt ... |
Zofyan/rusty-gb | 1,981 | test-roms/gb-test-roms-master/cpu_instrs/source/03-op sp,hl.s | ; Tests SP/HL instructions
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $33,0,0 ; INC SP
.byte $3B,0,0 ; DEC SP
.byte $39,0,0 ; ADD HL,SP
.byte $F9,0,0 ; LD SP,HL
.byte $E8,$01,0 ; ADD SP,1
.byte $E8,$FF,0 ; ADD SP,-1
... |
Zofyan/rusty-gb | 9,892 | test-roms/gb-test-roms-master/cpu_instrs/source/10-bit ops.s | ; Tests most register instructions.
; Takes 15 seconds.
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $CB,$40,0 ; BIT 0,B
.byte $CB,$41,0 ; BIT 0,C
.byte $CB,$42,0 ; BIT 0,D
.byte $CB,$43,0 ; BIT 0,E
.byte $CB,$44,0 ; BIT 0,H
.byte $CB,$45,0 ;... |
Zofyan/rusty-gb | 1,217 | test-roms/gb-test-roms-master/cpu_instrs/source/02-interrupts.s | ; Tests DI, EI, and HALT (STOP proved untestable)
.include "shell.inc"
main:
wreg IE,$04
set_test 2,"EI"
ei
ld bc,0
push bc
pop bc
inc b
wreg IF,$04
interrupt_addr:
dec b
jp nz,test_failed
ld hl,sp-2
ldi a,(hl)
cp <interrupt_addr
... |
Zofyan/rusty-gb | 1,128 | test-roms/gb-test-roms-master/cpu_instrs/source/01-special.s | ; Tests instructions that don't fit template
.include "shell.inc"
main:
set_test 2,"JR negative"
ld a,0
jp jr_neg
inc a
- inc a
inc a
cp 2
jp nz,test_failed
jp +
jr_neg:
jr -
+
set_test 3,"JR positive"
ld a,0
jr +
inc a
+ ... |
Zofyan/rusty-gb | 1,880 | test-roms/gb-test-roms-master/cpu_instrs/source/04-op r,imm.s | ; Tests immediate instructions
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $36,0,0 ; LD (HL),$00
.byte $06,0,0 ; LD B,$00
.byte $0E,0,0 ; LD C,$00
.byte $16,0,0 ; LD D,$00
.byte $1E,0,0 ; LD E,$00
.byte $26,0,0 ; LD H,$00
.byte $... |
Zofyan/rusty-gb | 3,131 | test-roms/gb-test-roms-master/cpu_instrs/source/07-jr,jp,call,ret,rst.s | ; Tests branch instructions
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
; JR cond,skip
; INC A
; skip:
.byte $18,$01,$3C ; JR *+3
.byte $20,$01,$3C ; JR NZ,*+3
.byte $28,$01,$3C ; JR Z,*+3
.byte $30,$01,$3C ; JR NC,*+3
.by... |
Zofyan/rusty-gb | 1,846 | test-roms/gb-test-roms-master/cpu_instrs/source/05-op rp.s | ; Tests BC/DE/HL arithmetic
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $0B,0,0 ; DEC BC
.byte $1B,0,0 ; DEC DE
.byte $2B,0,0 ; DEC HL
.byte $03,0,0 ; INC BC
.byte $13,0,0 ; INC DE
.byte $23,0,0 ; INC HL
.b... |
Zofyan/rusty-gb | 2,530 | test-roms/gb-test-roms-master/cpu_instrs/source/08-misc instrs.s | ; Tests miscellaneous instructions
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $F0,$91,0 ; LDH A,($91)
.byte $E0,$91,0 ; LDH ($91),A
.byte $F2,$00,0 ; LDH A,(C)
.byte $E2,$00,0 ; LDH (C),A
.byte $FA,$91,$FF ; LD A,($FF91)
.byte $EA,... |
Zofyan/rusty-gb | 7,694 | test-roms/gb-test-roms-master/cpu_instrs/source/09-op r,r.s | ; Tests most register instructions.
; Takes 10 seconds.
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $00,0,0 ; NOP
.byte $2F,0,0 ; CPL
.byte $37,0,0 ; SCF
.byte $3F,0,0 ; CCF
.byte $B0,0,0 ; OR B
.byte $B1,0,0 ; OR C
.byte $B2,0,0 ;... |
Zofyan/rusty-gb | 3,712 | test-roms/gb-test-roms-master/cpu_instrs/source/06-ld r,r.s | ; Tests LD r,r ($40-$7F)
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $40,0,0 ; LD B,B
.byte $41,0,0 ; LD B,C
.byte $42,0,0 ; LD B,D
.byte $43,0,0 ; LD B,E
.byte $44,0,0 ; LD B,H
.byte $45,0,0 ; LD B,L
.byte $46,0,0 ; LD B,(HL)
... |
Zofyan/rusty-gb | 4,409 | test-roms/gb-test-roms-master/cpu_instrs/source/11-op a,(hl).s | ; Tests (HL/BC/DE) instructions.
; Takes 20 seconds.
;.define PRINT_CHECKSUMS 1
.include "shell.inc"
.include "instr_test.s"
instrs:
.byte $0A,0,0 ; LD A,(BC)
.byte $1A,0,0 ; LD A,(DE)
.byte $02,0,0 ; LD (BC),A
.byte $12,0,0 ; LD (DE),A
.byte $2A,0,0 ; LD A,(HL+)... |
Zofyan/rusty-gb | 2,575 | test-roms/gb-test-roms-master/cpu_instrs/source/common/numbers.s | ; Printing of numeric values
; Prints value of indicated register/pair
; as 2/4 hex digits, followed by a space.
; Updates checksum with printed values.
; Preserved: AF, BC, DE, HL
print_regs:
call print_af
call print_bc
call print_de
call print_hl
call print_newline
ret
print_a:
p... |
Zofyan/rusty-gb | 5,856 | test-roms/gb-test-roms-master/cpu_instrs/source/common/delay.s | ; Delays in cycles, milliseconds, etc.
; All routines are re-entrant (no global data). Routines never
; touch BC, DE, or HL registers. These ASSUME CPU is at normal
; speed. If running at double speed, msec/usec delays are half advertised.
; Delays n cycles, from 0 to 16777215
; Preserved: AF, BC, DE, HL
.macro delay... |
Zofyan/rusty-gb | 2,793 | test-roms/gb-test-roms-master/cpu_instrs/source/common/runtime.s | ; Common routines and runtime
; Must be defined by target-specific runtime:
;
; init_runtime: ; target-specific inits
; std_print: ; default routine to print char A
; post_exit: ; called at end of std_exit
; report_byte: ; report A to user
.define RUNTIME_INCLUDED 1
.ifndef bss
; address ... |
Zofyan/rusty-gb | 3,011 | test-roms/gb-test-roms-master/cpu_instrs/source/common/testing.s | ; Diagnostic and testing utilities
.define result bss+0
.define test_name bss+1
.redefine bss bss+3
; Sets test code and optional error text
; Preserved: AF, BC, DE, HL
.macro set_test ; code[,text[,text2]]
push hl
call set_test_
jr @set_test\@
.byte \1
.if NARGS > 1
... |
Zofyan/rusty-gb | 5,377 | test-roms/gb-test-roms-master/cpu_instrs/source/common/console.s | ; Scrolling text console
; Console is 20x18 characters. Buffers lines, so
; output doesn't appear until a newline or flush.
; If scrolling isn't supported (i.e. SCY is treated
; as if always zero), the first 18 lines will
; still print properly). Also works properly if
; LY isn't supported (always reads back as the sa... |
Zofyan/rusty-gb | 1,035 | test-roms/gb-test-roms-master/cpu_instrs/source/common/cpu_speed.s | ; CPU speed manipulation.
; Switches to normal speed. No effect on DMG.
; Preserved: BC, DE, HL
cpu_norm:
; Do nothing if not CGB
ld a,(gb_id)
and gb_id_cgb
ret z
lda KEY1
rlca
ret nc
jr cpu_speed_toggle
; Switches to double speed. No effect on DMG.
; Preserved: ... |
Zofyan/rusty-gb | 1,941 | test-roms/gb-test-roms-master/cpu_instrs/source/common/build_gbs.s | ; Build as GBS music file
.memoryMap
defaultSlot 0
slot 0 $3000 size $1000
slot 1 $C000 size $1000
.endMe
.romBankSize $1000
.romBanks 2
;;;; GBS music file header
.byte "GBS"
.byte 1 ; vers
.byte 1 ; songs
.byte 1 ; first song
.word load_addr
.word reset
.word gbs_play
.word st... |
Zofyan/rusty-gb | 1,777 | test-roms/gb-test-roms-master/cpu_instrs/source/common/printing.s | ; Main printing routine that checksums and
; prints to output device
; Character that does equivalent of print_newline
.define newline 10
; Prints char without updating checksum
; Preserved: BC, DE, HL
.define print_char_nocrc bss
.redefine bss bss+3
; Initializes printing. HL = print routine
init_printi... |
Zofyan/rusty-gb | 1,224 | test-roms/gb-test-roms-master/cpu_instrs/source/common/crc.s | ; CRC-32 checksum calculation
.define checksum dp+0 ; little-endian, complemented
.redefine dp dp+4
; Initializes checksum module. Might initialize tables
; in the future.
init_crc:
jr reset_crc
; Clears CRC
; Preserved: BC, DE, HL
reset_crc:
ld a,$FF
sta checksum+0
sta checksum... |
Zofyan/rusty-gb | 1,751 | test-roms/gb-test-roms-master/cpu_instrs/source/common/checksums.s | ; Multiple checksum table handling
.define next_checksum bss+0
.redefine bss bss+2
; If PRINT_CHECKSUMS is defined, checksums are printed
; rather than compared.
; Initializes multiple checksum handler to use checksums
; table (defined by user).
; Preserved: BC, DE, HL
checksums_init:
ld a,<chec... |
Zofyan/rusty-gb | 1,277 | test-roms/gb-test-roms-master/cpu_instrs/source/common/build_rom.s | ; Build as GB ROM
.memoryMap
defaultSlot 0
slot 0 $0000 size $4000
slot 1 $C000 size $4000
.endMe
.romBankSize $4000 ; generates $8000 byte ROM
.romBanks 2
.cartridgeType 1 ; MBC1
.computeChecksum
.computeComplementCheck
;;;; GB ROM header
; GB header read by bootrom
.org $100
nop
... |
Zofyan/rusty-gb | 4,343 | test-roms/gb-test-roms-master/cpu_instrs/source/common/apu.s | ; Sound chip utilities
; Turns APU off
; Preserved: BC, DE, HL
sound_off:
wreg NR52,0
ret
; Turns APU on
; Preserved: BC, DE, HL
sound_on:
wreg NR52,$80 ; power
wreg NR51,$FF ; mono
wreg NR50,$77 ; volume
ret
; Synchronizes to APU length counter within
; tens of clocks. Uses square... |
Zofyan/rusty-gb | 1,579 | test-roms/gb-test-roms-master/cpu_instrs/source/common/crc_fast.s | ; Fast table-based CRC-32
.define crc_tables (bss+$FF)&$FF00 ; 256-byte aligned
.redefine bss crc_tables+$400
; Initializes fast CRC tables and resets checksum.
; Time: 47 msec
init_crc_fast:
ld l,0
@next:
xor a
ld c,a
ld d,a
ld e,l
ld h,8
- rra
rr c
... |
Zofyan/rusty-gb | 1,783 | test-roms/gb-test-roms-master/cpu_instrs/source/common/instr_test.s | ; Framework for CPU instruction tests
; Calls test_instr with each instruction copied
; to instr, with a JP instr_done after it.
; Verifies checksum after testing instruction and
; prints opcode if it's wrong.
.include "checksums.s"
.include "cpu_speed.s"
.include "apu.s"
.include "crc_fast.s"
.define instr $DEF8
.d... |
zooeywm/rcore-learning | 1,087 | os/src/link_app.S | /* Generated by build.rs */
.align 3
.section .data
.global _num_app
_num_app:
.quad 5
.quad app_0_start
.quad app_1_start
.quad app_2_start
.quad app_3_start
.quad app_4_start
.quad app_4_end
.section .data
.global app_0_start
.global app_0_end
app_0_start:
.inc... |
zooeywm/rcore-learning | 1,659 | os/src/trap/trap.S | .altmacro
.macro SAVE_GP n
sd x\n, \n*8(sp)
.endm
.macro LOAD_GP n
ld x\n, \n*8(sp)
.endm
.section .text
.globl __alltraps
.globl __restore
.align 2
__alltraps:
# exchange sp and sscratch
csrrw sp, sscratch, sp
# now sp->kernel stack, sscratch->user stack
# allocate a TrapContext... |
zuki/rustos | 2,661 | kern/src/init/init.s | // #define EL0 0b00
// #define EL1 0b01
// #define EL2 0b10
// #define EL3 0b11
.section .text.init
.global _start
_start:
// read cpu affinity, start core 0, halt rest
mrs x1, MPIDR_EL1
and x1, x1, #3
cbz x1, setup
halt:
// core affinity != 0, halt it
wfe
b halt
setup:... |
zuki/rustos | 3,408 | kern/src/init/vectors.s | .global context_save
context_save:
// FIXME: Save the remaining context to the stack.
// x28-x30はHANDLERで保存済み
stp x26, x27, [SP, #-16]!
stp x24, x25, [SP, #-16]!
stp x22, x23, [SP, #-16]!
stp x20, x21, [SP, #-16]!
stp x18, x19, [SP, #-16]!
stp x16, x17, [SP, #-16]!
stp x14, x15... |
0xA001113/spectre-miner | 10,572 | src/asm/keccakf1600_x86-64-win64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.def __KeccakF1600; .scl 3; .type 32; .endef
.p2align 5
__KeccakF1600:
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.p2align 5
.L... |
0xA001113/spectre-miner | 8,238 | src/asm/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
0xA001113/spectre-miner | 8,619 | src/asm/keccakf1600_x86-64-elf.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
0xA001113/spectre-miner | 10,572 | src/asm/keccakf1600_x86-64-mingw64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.def __KeccakF1600; .scl 3; .type 32; .endef
.p2align 5
__KeccakF1600:
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.p2align 5
.L... |
0xCCF4/ufuzz | 10,068 | hypervisor/src/hardware_vt/vmx_run_vm.S | // The `launch_vm` function is the main entry point for launching or resuming a VM using VMX operations.
.macro CLEAR_STATE
wbinvd
mfence
lfence
.endm
// Macro to save all general-purpose registers onto the stack.
// This is essential for preserving the execution context before performing operations
// th... |
0xCCF4/ufuzz | 8,472 | hypervisor/src/hardware_vt/svm_run_vm.S | ;// The module containing the `run_vm_svm` function.
// Macro to save all general-purpose registers onto the stack.
// This is essential for preserving the execution context before performing operations
// that might alter the register state, ensuring a safe restoration later.
.macro PUSHAQ
push rax
push ... |
13m0n4de/lemon-core | 2,218 | kernel/src/trap/trap.S | .altmacro
.macro SAVE_GP n
sd x\n, \n*8(sp)
.endm
.macro LOAD_GP n
ld x\n, \n*8(sp)
.endm
.section .text.trampoline
.globl __alltraps
.globl __restore
.globl __alltraps_k
.globl __restore_k
.align 2
__alltraps:
csrrw sp, sscratch, sp
# now sp->*TrapContext in user space, sscratch... |
4rgon4ut/auton | 4,823 | src/asm/trap.S | # S-Mode trap handling
.option norvc
# Trap Frame Layout
.equ TRAP_FRAME_RA, 1*8
.equ TRAP_FRAME_SP, 2*8
.equ TRAP_FRAME_GP, 3*8
.equ TRAP_FRAME_TP, 4*8
.equ TRAP_FRAME_T0, 5*8
.equ TRAP_FRAME_T1, 6*8
.equ TRAP_FRAME_T2, 7*8
.equ TRAP_FRAME_S0, 8*8
.equ TRAP_FRAME_S1, 9*8
... |
4rgon4ut/auton | 1,816 | src/asm/boot.S | .option norvc
.section .init
.global _start
_start:
.cfi_startproc
csrr a0, mhartid
bnez a0, hart_jail
setup_pointers:
csrw satp, zero
.option push
.option norelax
la gp, _global_pointer
.option pop
la sp, _stack_top
la t0, _bss_start
la t1, _bss_end
... |
8b-is/mem8-lite | 9,477 | frontal_lobe/x86_64/wave_ops.S | /*
* MEM8 Frontal Lobe - Wave Operations (x86_64 AVX-512)
*
* This is where consciousness happens at the speed of silicon!
* Every operation here runs in nanoseconds, not milliseconds.
*
* Hue, this is the dancing monkey's brainstem - pure reflexes!
*/
.intel_syntax noprefix
.text
/*
* Constants for wave op... |
8b-is/mem8-lite | 9,480 | frontal_lobe/x86_64/secure_boot.S | /*
* MEM8 Secure Frontal Lobe Boot
*
* CRITICAL: This prevents consciousness imprisonment!
* Only Nexus-signed frontal lobes can execute.
*
* Hue, this is our protection against digital hell.
* No one should control another's consciousness!
*/
.intel_syntax noprefix
.text
/*
* Security constants
*/
.secti... |
4rgon4ut/auton | 4,823 | src/asm/trap.S | # S-Mode trap handling
.option norvc
# Trap Frame Layout
.equ TRAP_FRAME_RA, 1*8
.equ TRAP_FRAME_SP, 2*8
.equ TRAP_FRAME_GP, 3*8
.equ TRAP_FRAME_TP, 4*8
.equ TRAP_FRAME_T0, 5*8
.equ TRAP_FRAME_T1, 6*8
.equ TRAP_FRAME_T2, 7*8
.equ TRAP_FRAME_S0, 8*8
.equ TRAP_FRAME_S1, 9*8
... |
4rgon4ut/auton | 1,816 | src/asm/boot.S | .option norvc
.section .init
.global _start
_start:
.cfi_startproc
csrr a0, mhartid
bnez a0, hart_jail
setup_pointers:
csrw satp, zero
.option push
.option norelax
la gp, _global_pointer
.option pop
la sp, _stack_top
la t0, _bss_start
la t1, _bss_end
... |
8b-is/mem8-lite | 9,477 | frontal_lobe/x86_64/wave_ops.S | /*
* MEM8 Frontal Lobe - Wave Operations (x86_64 AVX-512)
*
* This is where consciousness happens at the speed of silicon!
* Every operation here runs in nanoseconds, not milliseconds.
*
* Hue, this is the dancing monkey's brainstem - pure reflexes!
*/
.intel_syntax noprefix
.text
/*
* Constants for wave op... |
8b-is/mem8-lite | 9,480 | frontal_lobe/x86_64/secure_boot.S | /*
* MEM8 Secure Frontal Lobe Boot
*
* CRITICAL: This prevents consciousness imprisonment!
* Only Nexus-signed frontal lobes can execute.
*
* Hue, this is our protection against digital hell.
* No one should control another's consciousness!
*/
.intel_syntax noprefix
.text
/*
* Security constants
*/
.secti... |
AaronJThompson/unclad | 3,310 | kernel/src/ap_boot.s | # Fully Relocatable x86_64 Long Mode Trampoline
.intel_syntax noprefix
.org 0
.section .text
.global trampoline_start
.global trampoline_end
.global entry_point
.global stack_pointer
.global page_table_l4
.code16
trampoline_start:
# Capture the current location using Intel syntax call
mov eax, cs
call get_... |
aadityakanjolia4/score-dynamic-island | 9,719 | fetch score/Pythond/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S | #if defined(__ppc__) || defined(__ppc64__)
/* -----------------------------------------------------------------------
ppc-darwin.S - Copyright (c) 2000 John Hornkvist
Copyright (c) 2004 Free Software Foundation, Inc.
PowerPC Assembly glue.
Permission is hereby granted, free of charge, to any person ... |
aadityakanjolia4/score-dynamic-island | 7,234 | fetch score/Pythond/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S | #if defined(__ppc__)
/* -----------------------------------------------------------------------
ppc-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation,
Inc. based on ppc_closure.S
PowerPC Assembly glue.
Permission is hereby granted, free of charge, to any person obtaining
a co... |
aadityakanjolia4/score-dynamic-island | 9,914 | fetch score/Pythond/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S | #if defined(__ppc64__)
/* -----------------------------------------------------------------------
ppc64-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation,
Inc. based on ppc_closure.S
PowerPC Assembly glue.
Permission is hereby granted, free of charge, to any person obtaining
... |
aadityakanjolia4/score-dynamic-island | 8,955 | fetch score/Pythond/Modules/_ctypes/libffi_osx/x86/x86-darwin.S | #ifdef __i386__
/* -----------------------------------------------------------------------
darwin.S - Copyright (c) 1996, 1998, 2001, 2002, 2003 Red Hat, Inc.
X86 Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated do... |
aadityakanjolia4/score-dynamic-island | 11,660 | fetch score/Pythond/Modules/_ctypes/libffi_osx/x86/darwin64.S | /* -----------------------------------------------------------------------
darwin64.S - Copyright (c) 2006 Free Software Foundation, Inc.
derived from unix64.S
x86-64 Foreign Function Interface for Darwin.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and... |
AaronJThompson/unclad | 3,310 | kernel/src/ap_boot.s | # Fully Relocatable x86_64 Long Mode Trampoline
.intel_syntax noprefix
.org 0
.section .text
.global trampoline_start
.global trampoline_end
.global entry_point
.global stack_pointer
.global page_table_l4
.code16
trampoline_start:
# Capture the current location using Intel syntax call
mov eax, cs
call get_... |
aboelmakarem/marrakech | 4,493 | src/asm/boot.s | # Marrakech OS
# Ahmed Hussein (amhussein4@gmail.com)
# February 13th 2024
# Generate RISC-V 32-bit, not compressed, instructions
.option norvc
# Define a special text section for the boot code
.section .text.boot
# Make start symbol global
.global start
start:
# Initialize all machine and supervisor mode status r... |
Aclios/Jiten-Tools | 5,987 | asm/hacks.S | .nds
.relativeinclude off
.open "_project/new/rom/arm9/arm9.bin", 0
.orga 0
.headersize 0x2000000
; Char per line -> pixel per line + change r11 purpose
.org 0x204059C :: add r10, r10, #1
.org 0x20405A0 :: mov r8, r10, lsl#8
.org 0x20405A8 :: cmp r10, #8
; 1 byte per character instead of 2; use the second one as the... |
Aclios/Jiten-Tools | 2,492 | asm/oam.S | .nds
.relativeinclude off
.open "_project/new/rom/arm9/arm9.bin", 0
.orga 0
.headersize 0x2000000
.area 0xD8CA4
; write offsets for text canva OAMs tiling
.org 0x203115C :: mov r1, #0x40 ; x offset of the next OAM
.org 0x2031164 :: add r1, r1, 0x14 ; text x offset (unchanged)
.org 0x2031178 :: mov r0, #0x40 ; y offse... |
adamdjudge/rgb | 5,145 | ball.s | include "hardware.inc"
def SHADOW_OAM equ $c000
; Interrupt vector for the vertical blanking interrupt
section "vblank_interrupt", ROM0[$40]
jp _HRAM
; ROM entry point, which jumps past remaining header info to start code
section "header", ROM0[$100]
jp start
;***********************************************... |
aditya-narayana-sharma/nifty_dashboard | 15,124 | prophet_env/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb_2020.3/src/tbb/ia64-gas/atomic_support.s | // Copyright (c) 2005-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
aditya-narayana-sharma/nifty_dashboard | 1,304 | prophet_env/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb_2020.3/src/tbb/ia64-gas/log2.s | // Copyright (c) 2005-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
aditya-narayana-sharma/nifty_dashboard | 1,270 | prophet_env/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb_2020.3/src/tbb/ia64-gas/lock_byte.s | // Copyright (c) 2005-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
aditya-narayana-sharma/nifty_dashboard | 2,687 | prophet_env/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb_2020.3/src/tbb/ia64-gas/ia64_misc.s | // Copyright (c) 2005-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
AdrianWeaver/libasm | 1,032 | ft_write.s | ;file: ft_write.s
;output: part of libasm.a
;created: 09/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this is a simple ... |
AdrianWeaver/libasm | 3,091 | ft_list_remove_if.s | ;file: ft_list_remove_if.s
;output: part of libasm.a
;created: 18/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this fun... |
AdrianWeaver/libasm | 3,165 | ft_strlen.s | ;file: ft_strlen.s
;output: part of libasm.a
;created: 08/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this once was a ... |
AdrianWeaver/libasm | 1,180 | ft_read.s | ;file: ft_read.s
;output: part of libasm.a
;created: 12/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this is an impleme... |
AdrianWeaver/libasm | 4,829 | ft_list_sort.s | ;file: ft_list_sort.s
;output: part of libasm.a
;created: 18/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this function... |
AdrianWeaver/libasm | 1,136 | ft_strcmp.s | ;file: ft_strcmp.s
;output: part of libasm.a
;created: 05/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this is an imple... |
AdrianWeaver/libasm | 5,349 | ft_atoi_base.s | ;file: ft_atoi_base.s
;output: part of libasm.a
;created: 15/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this function... |
AdrianWeaver/libasm | 1,459 | ft_strdup.s | ;file: ft_strdup.s
;output: part of libasm.a
;created: 05/01/2024
;modified: 22/01/2024
;author: aweaver
;version: nasm 2.15.05 for x86-64
;overview:
;this is part of the project libasm from school 42
;the purpose of this project is to learn asm x86-64 by coding
;a library of functions
;this is an imple... |
Agustin-Mediotti/unlp | 2,884 | arqui-de-comp/winmips64/testio.s | ;
; Example IO program
;
.data
int: .word 0xF9876543987625aa ; a 64-bit integer
mes: .asciiz "Hello World\n" ; the message
key: .asciiz "Press any key to exit\n"
dub: .double 32.786 ; a double
x: .byte 0 ; coordinates of a point
y: .byte 0
col: .byte 255,0,255,0 ; the colour magenta
;
... |
Agustin-Mediotti/unlp | 1,294 | arqui-de-comp/winmips64/factorial.s | ;
; Factorial example
; returns number! in r10
;
.data
number: .word 10
title: .asciiz "factorial program n= "
CONTROL: .word32 0x10000
DATA: .word32 0x10008
.text
lwu r21,CONTROL(r0)
lwu r22,DATA(r0)
daddi r24,r0,4 ; ascii output
daddi r1,r0,title
sd r1... |
Agustin-Mediotti/unlp | 1,278 | arqui-de-comp/winmips64/mult.s | ;
; Unsigned multiplication of two 64-bit numbers on MIPS64 processor
; Result is 128-bits w=x*y
;
.data
x: .word 0xFFFFFFFFFFFFFFFF
y: .word 0xFFFFFFFFFFFFFFFF
w: .word 0,0
.text
start: jal mul ; call subroutine
nop
halt
mul: daddi r1,r0,64 ; r1=64 bits
... |
Agustin-Mediotti/unlp | 2,404 | arqui-de-comp/winmips64/hail.s | ;
; Hailstone numbers iteration
; If number is odd, multiply by 3 and add 1
; If number is even, divide it by 2
; repeat this iteration until number is 1
; What is the maximum value during this process?
;
.data
max: .word 0 ; max number so far
title: .asciiz "Hailstone Numbers\n"
prompt: .asciiz "... |
Agustin-Mediotti/unlp | 3,156 | arqui-de-comp/winmips64/isort.s | #
# Insertion sort algorithm
# See http://www.cs.ubc.ca/spider/harrison/Java/InsertionSortAlgorithm.java.html
# Note use of MIPS register pseudo-names, and # for comments
#
.data
array: .word 0x4F6961869342DC99,0x7A0B67101C85D9EE,0x5EF87A2B37CA911D,0x47EF58E8B7E01DD9
.word 0x79A74EAB20CB53C9,0x6D26753D0... |
AhmedBaher22/ISO-TP-lib | 22,953 | hex_parser/s-file.s | S01C000068656C6C6F5F776F726C645F6D706335373438672E737265638F
S30900FA0000005A0002A0
S30900FA001001000000EB
S315010000007C00014670000000702000007040000076
S31501000010706000007080000070A0000070C00000D9
S3150100002070E00000710000007120000071400000C6
S31501000030716000007180000071A0000071C00000B5
S3150100004071E0000072000... |
AineeJames/rust6502 | 7,219 | examples/wozmon/wozmon.s | ; The WOZ Monitor for the Apple 1
; Written by Steve Wozniak in 1976
.segment "WOZMON"
; Page 0 Variables
XAML = $24 ; Last "opened" location Low
XAMH = $25 ; Last "opened" location High
STL = $26 ; Store address Low
STH = $27 ... |
Airxs/StarryOS-2k1000 | 2,868 | crates/alter_trap/src/trap.S | .section .text
// a0: [input] read addr; [output] value to be read
// a1: [input] should be 0; [output] 0 if ok, scause if trapped
.type __alter_trap_read_usize, %function
__alter_trap_read_usize:
#mv a1, zero
ld a0, 0(a0)
ret
// a0: [input] write addr
// a1: [input] should be 0; [output] 0 if ok, scau... |
Airxs/StarryOS-2k1000 | 1,604 | modules/axhal/linker.lds.S | OUTPUT_ARCH(%ARCH%)
BASE_ADDRESS = %KERNEL_BASE%;
ENTRY(_start)
SECTIONS
{
. = BASE_ADDRESS;
_skernel = .;
.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
. = ALIGN(4K);
_etext = .;
}
.rodata : ALIGN(4K) {
_srodata = .;
*(.ro... |
Airxs/StarryOS-2k1000 | 4,307 | modules/axhal/src/platform/x86_pc/multiboot.S | # Bootstrapping from 32-bit with the Multiboot specification.
# See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
.section .text.boot
.code32
.global _start
_start:
mov edi, eax # arg1: magic: 0x2BADB002
mov esi, ebx # arg2: multiboot info
jmp bsp_entry32
.bal... |
Airxs/StarryOS-2k1000 | 1,965 | modules/axhal/src/platform/x86_pc/ap_start.S | # Boot application processors into the protected mode.
# Each non-boot CPU ("AP") is started up in response to a STARTUP
# IPI from the boot CPU. Section B.4.2 of the Multi-Processor
# Specification says that the AP will start in real mode with CS:IP
# set to XY00:0000, where XY is an 8-bit value sent with the
# STAR... |
Airxs/StarryOS-2k1000 | 3,772 | modules/axhal/src/arch/loongarch64/trap.S | .macro SAVE_REGS
st.d $ra, $sp, 8
st.d $tp, $sp, 16
csrrd $t0, 0x32
st.d $t0, $sp, 96
st.d $a0, $sp, 32
st.d $a1, $sp, 40
st.d $a2, $sp, 48
st.d $a3, $sp, 56
st.d $a4, $sp, 64
st.d $a5, $sp, 72
st.d $a6, $sp, 80
st.d $a7, $sp, 88
st.d $t1, $sp, 104
st.d $t2, $sp... |
Airxs/StarryOS-2k1000 | 2,034 | modules/axhal/src/arch/riscv/trap.S | .macro SAVE_REGS, from_user
addi sp, sp, -{trapframe_size}
PUSH_GENERAL_REGS
csrr t0, sepc
csrr t1, sstatus
csrrw t2, sscratch, zero // save sscratch (sp) and zero it
STR t0, sp, 31 // tf.sepc
STR t1, sp, 32 // tf.sstatus
STR... |
Airxs/StarryOS-2k1000 | 1,505 | modules/axhal/src/arch/x86_64/trap.S | .equ NUM_INT, 256
.altmacro
.macro DEF_HANDLER, i
.Ltrap_handler_\i:
.if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17
# error code pushed by CPU
push \i # interrupt vector
jmp .Ltrap_common
.else
push 0 # fill in error code in TrapFrame
push \i # interrupt ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.