commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
ef0001ec536c48a83eee27d382fab48218c888ee | vm/safeseh.asm | vm/safeseh.asm | .386
.model flat
exception_handler proto
.safeseh exception_handler
end
| .386
.model flat
exception_handler proto c
.safeseh exception_handler
end
| Fix Windows compileation for VS 2010 | Fix Windows compileation for VS 2010
| Assembly | bsd-2-clause | sarvex/factor-lang,mrjbq7/factor,tgunr/factor,dch/factor,dch/factor,tgunr/factor,factor/factor,slavapestov/factor,bpollack/factor,AlexIljin/factor,bjourne/factor,bpollack/factor,slavapestov/factor,bpollack/factor,bjourne/factor,bpollack/factor,nicolas-p/factor,AlexIljin/factor,AlexIljin/factor,factor/factor,AlexIljin/factor,nicolas-p/factor,nicolas-p/factor,bjourne/factor,bpollack/factor,tgunr/factor,bpollack/factor,bjourne/factor,mrjbq7/factor,bpollack/factor,factor/factor,slavapestov/factor,sarvex/factor-lang,bjourne/factor,dch/factor,nicolas-p/factor,sarvex/factor-lang,slavapestov/factor,AlexIljin/factor,factor/factor,slavapestov/factor,dch/factor,sarvex/factor-lang,dch/factor,factor/factor,slavapestov/factor,tgunr/factor,nicolas-p/factor,mrjbq7/factor,dch/factor,tgunr/factor,nicolas-p/factor,bjourne/factor,sarvex/factor-lang,mrjbq7/factor,AlexIljin/factor,mrjbq7/factor,sarvex/factor-lang,mrjbq7/factor,slavapestov/factor,sarvex/factor-lang,AlexIljin/factor,bjourne/factor,nicolas-p/factor,factor/factor,tgunr/factor |
e918bf8dc9129eb3d83808b816fa66be02aa112d | src/arch/i686/arch_start.asm | src/arch/i686/arch_start.asm | ; This file is a part of the IncludeOS unikernel - www.includeos.org
;
; Copyright 2015 Oslo and Akershus University College of Applied Sciences
; and Alfred Bratterud
;
; 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 or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
global __arch_start:function
extern kernel_start
[BITS 32]
;; @param: eax - multiboot magic
;; @param: ebx - multiboot bootinfo addr
__arch_start:
;; Create stack frame for backtrace
push ebp
mov ebp, esp
;; hack to avoid stack protector
mov DWORD [0x1014], 0x89abcdef
;; Push params on 16-byte aligned stack
sub esp, 8
and esp, -16
mov [esp], eax
mov [esp+4], ebx
call kernel_start
;; Restore stack frame
mov esp, ebp
pop ebp
ret
sentinel_table:
dd sentinel_table ;; 0x0
dd 0 ;; 0x8
dd 0 ;; 0x10
dd 0 ;; 0x18
dd 0 ;; 0x20
dd 0x123456789ABCDEF
| ; This file is a part of the IncludeOS unikernel - www.includeos.org
;
; Copyright 2015 Oslo and Akershus University College of Applied Sciences
; and Alfred Bratterud
;
; 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 or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
global __arch_start:function
extern kernel_start
[BITS 32]
;; @param: eax - multiboot magic
;; @param: ebx - multiboot bootinfo addr
__arch_start:
;; Create stack frame for backtrace
push ebp
mov ebp, esp
;; hack to avoid stack protector
mov DWORD [0x1014], 0x89abcdef
;; Push params on 16-byte aligned stack
sub esp, 8
and esp, -16
mov [esp], eax
mov [esp+4], ebx
call kernel_start
;; Restore stack frame
mov esp, ebp
pop ebp
ret
| Remove unused sentinel table for i686 | i686: Remove unused sentinel table for i686
| Assembly | apache-2.0 | AndreasAakesson/IncludeOS,mnordsletten/IncludeOS,alfred-bratterud/IncludeOS,mnordsletten/IncludeOS,AnnikaH/IncludeOS,mnordsletten/IncludeOS,alfred-bratterud/IncludeOS,hioa-cs/IncludeOS,mnordsletten/IncludeOS,hioa-cs/IncludeOS,hioa-cs/IncludeOS,AndreasAakesson/IncludeOS,hioa-cs/IncludeOS,AndreasAakesson/IncludeOS,alfred-bratterud/IncludeOS,mnordsletten/IncludeOS,mnordsletten/IncludeOS,AndreasAakesson/IncludeOS,AndreasAakesson/IncludeOS,AnnikaH/IncludeOS,hioa-cs/IncludeOS,alfred-bratterud/IncludeOS,AndreasAakesson/IncludeOS,alfred-bratterud/IncludeOS,AnnikaH/IncludeOS,AnnikaH/IncludeOS,AnnikaH/IncludeOS |
6d283a283402f70e545e92b5d43b80be1b54a905 | 3/src/vasm/m1.asm | 3/src/vasm/m1.asm | \ This software is the Kestrel-3's first milestone: print a bunch of "A"
\ characters to the console.
$2000 ORG ( RISC-V ISA spec says we boot here. )
0 x31 auipc ( X31 = address of next insn )
assume-gp ( This lets us load big constants )
x31 gl> uart-port x2 ld ( X2 = uart transmit port )
x0 65 x3 addi ( X3 = ASCII code for "A" )
-> .again
x3 x2 0 sb ( send "A" to console )
.again x0 jal ( repeat forever )
-> uart-port $0F000000.00000000 D,
| \ This software is the Kestrel-3's first milestone: print a bunch of "A"
\ characters to the console.
$2000 ORG ( RISC-V ISA spec says we boot here. )
0 x31 auipc ( X31 = address of next insn )
assume-gp ( This lets us load big constants )
x31 gl> uart-port x2 ld ( X2 = uart transmit port )
x0 65 x3 addi ( X3 = ASCII code for "A" )
-> .again
x3 x2 0 sb ( send "A" to console )
x31 gl> .ctr x4 ld ( count how many "A"s we send )
x4 1 x4 addi
x4 x31 gs> .ctr sd
.again x0 jal ( repeat forever )
-> uart-port $0F000000.00000000 D,
-> .ctr 0.0 D,
| Test source update to test both gl> and gs> | Test source update to test both gl> and gs>
| Assembly | mpl-2.0 | 8l/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel,8l/kestrel,8l/kestrel,8l/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel,KestrelComputer/kestrel,8l/kestrel,8l/kestrel,sam-falvo/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel |
7e82e985f87357625cf9d7ce8763f56eee8d8dbc | Assembly/textbox/menu_request.asm | Assembly/textbox/menu_request.asm | ;;----------------------------------------------------------------------------;;
;; Increase textbox size in request menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
;; # REQUEST TITLE #
.arm
.org 020C5804h
MOV r1, #0x49 ; X Position: original 0x50
MOV r2, #4 ; Y Position: original 0x03
;; # STAMP GIVEN #
.org 020C5950h
MOV r1, #0xCD + 10 ; X position
| ;;----------------------------------------------------------------------------;;
;; Increase textbox size in request menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
;; # REQUEST TITLE #
.arm
.org 020C5804h
MOV r1, #0x49 ; X Position: original 0x50
MOV r2, #4 ; Y Position: original 0x03
;; # STAMP GIVEN #
.org 020C5950h
MOV r1, #0xCD + 10 ; X position
.org 020C5968h
MOV r1, #0xCE + 10 ; X position (to paint twice - bold effect)
| Fix the bold effect for stamps in request menu | Fix the bold effect for stamps in request menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
1e8ed6381b3841935694d170fa442c91672d2160 | src/boot.asm | src/boot.asm | # multiboot config and setup
.set ALIGN, 1<<0 # align modules on page boundaries
.set MEMINFO, 1<<1 # provide memory map
.set FLAGS, ALIGN | MEMINFO # flags
.set MAGIC, 0x1BADB002 # header magic
.set CHECKSUM, -(MAGIC + FLAGS) # checksum to prove multi
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
# configure early stack (to be replaced once gdt loaded)
.section .stack, "aw", @nobits
stack_bottom:
.skip 16384
stack_top:
.section .text
.extern entry
.global _start
.type _start, @function
_start:
mov $stack_top,%esp
call entry
_stop:
cli
1: hlt
jmp 1b
.size _start, . - _start
| # multiboot config and setup
.set ALIGN, 1 << 0 # align modules on page boundaries
.set MEMINFO, 1 << 1 # provide memory map
.set FLAGS, ALIGN | MEMINFO # flags
.set MAGIC, 0x1BADB002 # header magic
.set CHECKSUM, -(MAGIC + FLAGS) # checksum to prove multi
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
# configure early stack (to be replaced once gdt loaded)
.section .stack, "aw", @nobits
stack_bottom:
.skip 16384
stack_top:
.section .text
.extern entry
.extern load_gdt
.global _start
.type _start, @function
_start:
movl $stack_top,%esp
#call load_gdt
call entry
cli
halt:
hlt
jmp halt
.size _start, . - _start
| Add call for load_gdt, but disabled because it triple faults | Add call for load_gdt, but disabled because it triple faults
| Assembly | mit | Magical-Chicken/simple-x86-kernel,Magical-Chicken/simple-x86-kernel |
4e81f31ed4d81d5f5516417aa3850167e2d0a4d7 | src/isr_wrapper.asm | src/isr_wrapper.asm | use32
global _interrupt_handler_kbd_wrapper
global int_handler
global test1
global run_interrupt
align 4
extern _interrupt_handler_kbd
_interrupt_handler_kbd_wrapper:
pushad
call _interrupt_handler_kbd
popad
iret
run_interrupt:
int 33
ret
int_handler:
pushad
mov ax, 0x08
mov gs, ax
call _interrupt_handler_kbd
popad
iret
idt:
resd 50*2
idtr:
dw (50*8)-1
dd idt
test1:
lidt [idtr]
mov eax,int_handler
mov [idt+33*8],ax
mov word [idt+33*8+2],0x08
mov word [idt+33*8+4],0x8E00
shr eax,16
mov [idt+33*8+6],ax
mov eax,int_handler
mov [idt+1*8],ax
mov word [idt+1*8+2],0x08
mov word [idt+1*8+4],0x8E00
shr eax,16
mov [idt+1*8+6],ax
ret
| use32
global _interrupt_handler_kbd_wrapper
global int_handler
global test1
global run_interrupt
align 4
extern _interrupt_handler_kbd
_interrupt_handler_kbd_wrapper:
pushad
call _interrupt_handler_kbd
popad
iret
run_interrupt:
int 33
ret
int_handler:
pushad
mov ax, 0x08
mov gs, ax
call _interrupt_handler_kbd
popad
iret
idt:
resd 50*2
idtr:
dw (50*8)-1
dd idt
test1:
lidt [idtr]
mov eax,int_handler
mov [idt+33*8],ax
mov word [idt+33*8+2],0x08
mov word [idt+33*8+4],0x8E00
shr eax,16
mov [idt+33*8+6],ax
ret
| Remove unnecessary entry from IDT | Remove unnecessary entry from IDT
| Assembly | mit | jvns/puddle,jvns/puddle |
b996aafce6a826ccae7fb2bf1afc70414b9a1552 | asm/dos_drawbridge_stays_down.asm | asm/dos_drawbridge_stays_down.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch makes the drawbridge in DoS stay down permanently once you've lowered it once.
; The button will stay depressed, so that you don't need to worry about hitting it every time you walk into the room from the right.
.open "ftc/overlay9_0", 0219E3E0h
.org 0x021A27C8 ; When Soma walks/jumps off the button after pressing it, this line would normally re-raise the button.
nop ; Remove it so the button doesn't instantly come up.
.org 0x021A2260 ; This line runs when the drawbridge is created, if the drawbridge has already been lowered previously.
; Originally this line was doing something useless, storing 0 to a value which is just 0 by default anyway. So we can replace it.
strb r3, [r4, 5h] ; Store 1 to the button's "pressed" state so the player can't press it again.
.close
| Add patch to keep DoS drawbridge down once lowered | Add patch to keep DoS drawbridge down once lowered
| Assembly | mit | LagoLunatic/DSVEdit | |
5768ff0fbc420877eae4ce19428372064fb0ae09 | Tools/System/TaskSwapHandler.asm | Tools/System/TaskSwapHandler.asm | taskswapHandler :
pop ecx ; pop eip into ecx
pusha
mov ebx, [currentTaskNum] ; get the current task
imul ebx, TASK_OBJ_SIZE
add ebx, RunningTaskList
mov [ebx+Task_eip], ecx
mov [ebx+Task_stackLoc], esp ; store the relevent things
; get the next Task object into ebx
taskswapHandler.goLoop :
add ebx, TASK_OBJ_SIZE
cmp ebx, RunningTaskListEnd
jge taskswapHandler.doneZeroing
mov ebx, RunningTaskList
taskswapHandler.doneZeroing :
cmp dword [ebx+Task_id], 0
je taskswapHandler.goLoop
taskswapHandler.noloopback :
mov esp, [ebx+Task_stackLoc]
popa
push dword [ebx+Task_eip]
iret
currentTaskNum :
dd 0x0
RunningTaskList :
times 32*TASK_OBJ_SIZE db 0x0 ; 32 tasks max atm
RunningTaskListEnd :
Task_id equ 0x0
Task_stackLoc equ 0x4
Task_eip equ 0x8
TASK_OBJ_SIZE equ 0xC
registerTask : ; eip in ecx
pusha
mov ebx, RunningTaskList
registerTask.loop :
cmp dword [ebx+Task_id], 0
je registerTask.foundTask
add ebx, TASK_OBJ_SIZE
jmp registerTask.loop
registerTask.foundTask :
mov eax, [currentTaskId]
mov [ebx+Task_id], eax
mov [ebx+Task_eip], ecx
add eax, 1
mov [currentTaskId], eax
mov edx, ebx
sub eax, 1
mov ebx, TASK_STACK_SIZE
call Guppy.malloc
add ebx, TASK_STACK_SIZE*0x200
mov [edx+Task_stackLoc], ebx
popa
ret
unregisterTask : ; ID in ecx
pusha
mov ebx, RunningTaskList
unregisterTask.loop :
cmp dword [ebx+Task_id], ecx
je unregisterTask.foundTask
unregisterTask.foundTask :
xor ecx, ecx
mov [ebx+Task_id], ecx
popa
ret
currentTaskId :
dd 0x0
TASK_STACK_SIZE equ 2
| Add completely untested multitasking code | Add completely untested multitasking code | Assembly | mit | jaredwhitney/os3,jaredwhitney/os3 | |
acdebe5146277e14eef32d28755e413a9df837ba | runtime.asm | runtime.asm | use32
global _GLOBAL_OFFSET_TABLE_
global __morestack
global abort
global memcmp
global memcpy
global malloc
global free
global start
extern main
start:
; rust functions compare esp against [gs:0x30] as a sort of stack guard thing
; as long as we set [gs:0x30] to dword 0, it should be ok
mov [gs:0x30], dword 0
; clear the screen a slightly different colour
mov edi, 0xb8000
mov ecx, 80*25*2
mov al, 1
rep stosb
; jump into rust
call main
jmp $
_GLOBAL_OFFSET_TABLE_:
__morestack:
abort:
jmp $
memcmp:
jmp $
memcpy:
jmp $
malloc:
jmp $
free:
jmp $
| use32
global __morestack
global abort
global memcmp
global memcpy
global malloc
global free
global start
global _GLOBAL_OFFSET_TABLE_
_GLOBAL_OFFSET_TABLE_ equ 0
extern main
start:
; rust functions compare esp against [gs:0x30] as a sort of stack guard thing
; as long as we set [gs:0x30] to dword 0, it should be ok
mov [gs:0x30], dword 0
; clear the screen a slightly different colour
mov edi, 0xb8000
mov ecx, 80*25*2
mov al, 1
rep stosb
; jump into rust
call main
abort:
__morestack:
memcmp:
memcpy:
malloc:
free:
jmp $
| Set global GOT at 0 and merge infinite loops | Set global GOT at 0 and merge infinite loops
| Assembly | mit | pczarn/rustboot,alexchandel/rustboot,perlun/rustboot,wbthomason/ironkernel |
55f2dd180fb1f6207f05d1e1a53cb43d1f68a178 | client/c64/ifo.asm | client/c64/ifo.asm | BasicUpstart2(start)
* = $0810 "Main"
start:
rts
| BasicUpstart2(start)
* = $0810 "Main"
start:
jsr loadmap
rts
loadmap:
lda #fname_end-fname
ldx #<fname
ldy #>fname
jsr $FFBD //; call SETNAM
lda #$01
ldx $BA
//#; last used dev number
bne skip
ldx #$08 //; default to device 8
skip: ldy #$00 //; $00 means: load to new address
jsr $FFBA //; call SETLFS
ldx #<$1000
ldy #>$1000
lda #$00 //; $00 means: load to memory (not verify)
jsr $FFD5 //; call LOAD
bcs error //; if carry set, a load error has happened
rts
error:
// ; Accumulator contains BASIC error code
// ; most likely errors:
// ; A = $05 (DEVICE NOT PRESENT)
// ; A = $04 (FILE NOT FOUND)
// ; A = $1D (LOAD ERROR)
// ; A = $00 (BREAK, RUN/STOP has been pressed during loading)
// ... error handling ...
sta $d020
rts
fname: .text "MAP1A"
fname_end:
* = $1000 "map data section"
map:
.fill 1000,0
mapend:
| Add optimistic disk loading code to get the map into 000 | Add optimistic disk loading code to get the map into 000
| Assembly | bsd-2-clause | icepic/IFO-c64 |
7aeec1287ede1cd9ed851612db82edb15e4aa521 | core/src/ab-core-Entry.nasm | core/src/ab-core-Entry.nasm | %include "Ab/State.nasm"
extern ab_act
global ab_interpret_func
section .text
ab_interpret_func:
call ab_act
ret
| %include "Ab/State.nasm"
extern ab_act
global ab_interpret_func
section .text
; Byte* ab_interpret_func(ExecState*, ExecAction)
ab_interpret_func:
push rbx
mov rbx, rdi
call ab_act
cmp byte [rbx + ExecState.st_b + ExecStateB.condition], ExecCond_HALTED
je ab_exit
int 3
ab_exit:
pop rbx
ret
| Check the state->st_b.condition when returining from the interpreter | Check the state->st_b.condition when returining from the interpreter
Right now we are checking to make sure that the halted state is set.
This is not correct. Eventually we will want to add a mechanism for
specifying if we are transfering from the interpreter to compiled code.
Signed-off-by: Andrew Young <9b1c84997b9b503084a7ab9e0b7da3894895a5c3@gmail.com>
| Assembly | apache-2.0 | ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab |
28d70d6250da55e69922167ca440480c669b750c | tests/nasm/fsave_frstor.asm | tests/nasm/fsave_frstor.asm | global _start
section .data
align 16
%include "header.inc"
sub esp, 128
fldz
fld1
fsave [esp]
frstor [esp]
%include "footer.inc"
| Add test for fsave and frstor | Add test for fsave and frstor
| Assembly | bsd-2-clause | copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86 | |
47385f70b94e250b5bb81fc5b28059b3515256fe | 6502DotNet/Examples/vcs/pocbackgroundcyclecompiled.asm | 6502DotNet/Examples/vcs/pocbackgroundcyclecompiled.asm | .cpu "6502"
.format "flat"
* = $F000
BackgroundColor = $80
INT_Byte_SIZE = 1
VSYNC = $00
VBLANK = $01
WSYNC = $02
COLUBK = $09
TIM64T = $296
INTIM = $284
push .macro address, size
.for i = \address, i <= \address + (\size - 1), i = i + 1
LDA i
PHA
.next
.endmacro
popTo .macro address, size
.for i = \address + (\size - 1), i >= \address, i = i - 1
PLA
STA i
.next
.endmacro
// Can replace a consecutive ".push(...) .popTo(...)" as an optimization.
// Copies directly between 2 addresses without using PHA/PLA
copyTo .macro fromAddress, toAddress, size
.for i = 0, i < \size, i = i + 1
.let source = \fromAddress + i
.let destination = \toAddress + i
LDA source
STA destination
.next
.endmacro
Start
SEI
CLD
LDX #$FF
TXS
LDA #0
ClearMem
STA 0,X
DEX
BNE ClearMem
MainLoop
LDA #%00000010
STA VSYNC
STA WSYNC
STA WSYNC
STA WSYNC
LDA #43
STA TIM64T
LDA #0
STA VSYNC
INC BackgroundColor
//.push BackgroundColor, INT_Byte_SIZE
//.popTo COLUBK, INT_Byte_SIZE
// Compiler should optimize above to:
.copyTo BackgroundColor, COLUBK, INT_Byte_SIZE
WaitForVBlankEnd
LDA INTIM
BNE WaitForVBlankEnd
STA WSYNC
STA VBLANK
LDY #192
ScanLoop
STA WSYNC
DEY
BNE ScanLoop
LDA #2
STA WSYNC
STA VBLANK
LDY #30
OverScanWait
STA WSYNC
DEY
BNE OverScanWait
JMP MainLoop
// Special memory locations. Tells the 6502 where to go.
* = $FFFC
.word Start
.word Start | Add proof of concept file for using assembler macros instead of instructions. | Add proof of concept file for using assembler macros instead of instructions.
| Assembly | mit | Yttrmin/CSharpTo2600,Yttrmin/CSharpTo2600,Yttrmin/CSharpTo2600 | |
6d19ac909af8d7b5548fbba788af31fe3d074801 | Assembly/textbox/menu_request.asm | Assembly/textbox/menu_request.asm | ;;----------------------------------------------------------------------------;;
;; Increase textbox size in request menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
;; # REQUEST TITLE #
.arm
.org 020C5804h
MOV r1, #0x49 ; X Position: original 0x50
MOV r2, #4 ; Y Position: original 0x03
| ;;----------------------------------------------------------------------------;;
;; Increase textbox size in request menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
;; # REQUEST TITLE #
.arm
.org 020C5804h
MOV r1, #0x49 ; X Position: original 0x50
MOV r2, #4 ; Y Position: original 0x03
;; # STAMP GIVEN #
.org 020C5950h
MOV r1, #0xCD + 10 ; X position
| Move stamp gives in request menu | Move stamp gives in request menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
8af555e5373d7616ba5a43904d3b27db7c8d08ce | asm/dos_skip_name_signing.asm | asm/dos_skip_name_signing.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
; Skip the screen where the player has to sign their name and press OK when starting a new game.
.org 0x02045E8C ; Code that sets the name signing menu's state to 3 after zeroing out the name pixel data.
movne r0, 6h ; Instead set the state to 6, meaning the state where the player has pressed OK and the new game is now starting.
.close
| .nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
; Skip the screen where the player has to sign their name and press OK when starting a new game.
.org 0x02045E8C ; Code that sets the name signing menu's state to 3 after zeroing out the name pixel data.
movne r0, 6h ; Instead set the state to 6, meaning the state where the player has pressed OK and the new game is now starting.
.org 0x02045E78 ; Code that displays the name signing menu on the screen.
nop ; Delete it to prevent the name signing screen from being visible for a split second when starting a new game.
.close
| Tweak to skip name signing patch | Tweak to skip name signing patch
| Assembly | mit | LagoLunatic/DSVEdit |
31f9ab16a1370751841abd5b0852ab040b5a7654 | src/res/load_resources.asm | src/res/load_resources.asm | // load sid music
.var music = LoadSid("res/jeff_donald.sid")
//.var music = LoadSid("res/demo.sid")
.pc = music.location
.fill music.size, music.getData(i)
.var picture = LoadBinary("res/dcc.prg")
.pc = $2000 - 2 "Bitmap Data"
.fill picture.getSize(), picture.get(i) | // load sid music
//.var music = LoadSid("res/jeff_donald.sid")
.var music = LoadSid("res/demo.sid")
.pc = music.location "Music"
.fill music.size, music.getData(i)
.pc = $2000 - 2 "Bitmap Data"
.var picture = LoadBinary("res/dcc.prg")
.fill picture.getSize(), picture.get(i)
//----------------------------------------------------------
// Print the music info while assembling
.print ""
.print "SID Data"
.print "--------"
.print "location=$"+toHexString(music.location)
.print "init=$"+toHexString(music.init)
.print "play=$"+toHexString(music.play)
.print "songs="+music.songs
.print "startSong="+music.startSong
.print "size=$"+toHexString(music.size)
.print "name="+music.name
.print "author="+music.author
.print "copyright="+music.copyright
.print ""
.print "Additional tech data"
.print "--------------------"
.print "header="+music.header
.print "header version="+music.version
.print "flags="+toBinaryString(music.flags)
.print "speed="+toBinaryString(music.speed)
.print "startpage="+music.startpage
.print "pagelength="+music.pagelength
| Print additional info about SID file | Print additional info about SID file
| Assembly | cc0-1.0 | c64scene-ar/c64demo,c64scene-ar/c64demo,c64scene-ar/c64demo |
d7bfefdf28f2f314a7b4784f25d37dbbe1c908ae | asm/dos_skip_drawing_seals.asm | asm/dos_skip_drawing_seals.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This makes it so you don't need to draw a Magic Seal to kill a boss.
.org 0x02213C04 ; Location of the boss-killed code for loading the current game mode.
mov r0, 1 ; Always load 1 (meaning Julius mode).
.close
| .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This patch makes it so you don't need to draw a Magic Seal to kill a boss.
.org 0x02213C04 ; Location of the seal drawing code for loading the current game mode.
mov r0, 1 ; Always load 1 (meaning Julius mode).
; The above change causes a bug with the practice seal menu, where attempting to practice a seal will cause the screen to go black and the game to softlock.
.org 0x021F1BF8 ; Location of code in the practice menu to decide which type of seal to do.
mov r1, 0 ; Instead of setting argument r1 to 2 (meaning a practice seal) we set it to 0 (meaning an automatically drawn example seal). This doesn't softlock the game.
.close
| Fix bug in dos seal drawing skip patch | Fix bug in dos seal drawing skip patch
| Assembly | mit | LagoLunatic/DSVEdit |
250778ca070a4c9163e71c996104802d1ad69f5e | vic-20/basic-loader.asm | vic-20/basic-loader.asm | org $0fff
load_address:
$01 $10 @(low basic_end) @(high basic_end) $01 $00 $9e "4109" 0
basic_end:
$00 $00
| org $0fff
load_address:
$01 $10 @(low basic_end) @(high basic_end) $01 $00 $9e @(princ main nil) 0
basic_end:
$00 $00
| Make SYS call to label main, not the end of the BASIC program. | Make SYS call to label main, not the end of the BASIC program.
| Assembly | bsd-2-clause | SvenMichaelKlose/bender,SvenMichaelKlose/bender,SvenMichaelKlose/bender |
23f741273f13c9e3d3e6741deba02b2918bc5e6b | Assembly/textbox/menu_team.asm | Assembly/textbox/menu_team.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in team menu
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
;; Character face icon
.org 0x02130478
ADD R2, R2, #0x19 - 1 ; Y position
;; Health state
.org 0x02130A08
MOV R2, #0x2A + 1 ; Y position
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in team menu
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
;; Character face icon
.org 0x02130478
ADD R2, R2, #0x19 - 1 ; Y position
;; Health state
.org 0x02130A08
MOV R2, #0x2A + 1 ; Y position
;; Technique name
.org 0x021311AC
MOV R2, #7 - 3 ; Y position
;; Technique magic
.org 0x021311EC
MOV R2, #8 - 2 ; Y position
| Move technique name and PM in team menu | Move technique name and PM in team menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
a3cacd74f50263f9563afcfe41f1685b584cc007 | test/lnxhello.asm | test/lnxhello.asm | ;
; Assembly "Hello, World!" for Linux
;
/* Properly defined in <sys/syscall.h> */
%define SYS_exit 1
%define SYS_write 4
section .text
global _start
_start:
; gdb doesn't like to stop at the entry point address, so
; we put a nop here for pure convenience
nop
write_hello:
mov edx, hello_len
mov ecx, hello
.loop:
mov eax, SYS_write
mov ebx, 1 ; stdout
int 80h
cmp eax, -4096
ja error
add ecx, eax
sub edx, eax
jnz .loop
ok:
mov eax, SYS_exit
xor ebx, ebx
int 80h
hlt
error:
mov eax, SYS_exit
mov ebx, 1 ; Error
int 80h
hlt
section .rodata
hello: db "Hello, World!", 10
hello_len equ $-hello
| Add Linux "hello world" example | Add Linux "hello world" example
| Assembly | bsd-2-clause | letolabs/nasm,letolabs/nasm,techkey/nasm,turingstudio/nasm,projedi/nasm,turingstudio/nasm,projedi/nasm,Distrotech/nasm,techkey/nasm,projedi/nasm,Distrotech/nasm,techkey/nasm,turingstudio/nasm,letolabs/nasm,techkey/nasm,turingstudio/nasm,techkey/nasm,projedi/nasm,Distrotech/nasm,Distrotech/nasm,projedi/nasm | |
bc94cfa7d9c9b48553196ce978e2acd17ad02d4c | asm/dos_gergoth_either_side.asm | asm/dos_gergoth_either_side.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch makes Gergoth appear on the right half of his room when the player enters from the left so he's not on top of the player.
.open "ftc/overlay9_36", 022FF9C0h
.org 0x022FFAF0 ; Code in Gergoth's initialization that normally floors him in different ways depending on his var A.
; First we simplify the flooring code (to make room for new code) by always doing the same thing instead of having 4 different possibilities for 4 different var As.
mov r0, 0B0000h
str r0, [r5, 30h] ; Set Gergoth's Y pos to 0xB0.
ldr r0, =020CA95Ch
ldr r0, [r0] ; Load player's X pos.
cmp r0, 80000h ; Check if player came in on the left half of the room.
movlt r0, 0C0000h
strlt r0, [r5, 2Ch] ; Move Gergoth's X pos to 0xC0, close to the right wall.
b 022FFB48h
.pool
.close
| Add patch to make gergoth not be on top of player coming from left | Add patch to make gergoth not be on top of player coming from left
| Assembly | mit | LagoLunatic/DSVEdit | |
7f7bd80a17e70029245129b0571e1baa6f228dbd | asm/dos_julius_start_with_tower_key.asm | asm/dos_julius_start_with_tower_key.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This patch starts the player with the Tower Key in Julius mode.
; This is so the player doesn't get softlocked by the randomizer in Julius mode.
.org 0x021F6280
; Give all 5 magic seals (simplified version of the original code that was here)
mov r4, 1Fh
ldr r0, =020F7254h
strb r4, [r0]
; Then give Tower Key
mov r0, 2h
mov r1, 39h
bl 021E7870h ; GiveItem
b 021F62A8h ; Jump to after the constant pool
.pool
.close
| Add patch to start Julius with the Tower Key | Add patch to start Julius with the Tower Key
| Assembly | mit | LagoLunatic/DSVEdit | |
e7c7852fd8510306f0487f96317b14a446574ee0 | stage2/pmode.asm | stage2/pmode.asm | [ORG 0x10800]
PMode:
mov eax, 0xFEEDFACE
mov ecx, 0xF00DD00D
mov edx, 0xBAADBEEF
.jmpy:
hlt
jmp .jmpy | [ORG 0x10800]
[BITS 32]
PMode:
mov eax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 0x90000
mov ebp, esp
.jmpy:
hlt
jmp .jmpy
| Change setup for protected mode | Change setup for protected mode
| Assembly | apache-2.0 | vendu/Ukko,vendu/Ukko,vdamewood/Petrichor,vdamewood/Petrichor,vdamewood/Petrichor,vendu/Ukko |
c152bf0253a645fcdca7c64d8cdd44ace5e437f6 | asm/dos_melee_balore_blocks.asm | asm/dos_melee_balore_blocks.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This makes it so that all melee weapons can break balore blocks, not just Julius's whip.
.org 0x02212AB0 ; Branch of a switch statement taken for all melee weapons except Julius's whip.
b 02212D64h ; Instead take the branch taken for Julius's whip.
.close
| Add asm patch to break balore blocks with any weapon | Add asm patch to break balore blocks with any weapon
| Assembly | mit | LagoLunatic/DSVEdit | |
a269fee6dcf8c85e4f7bf1b9184bdca18964a96d | Pong/Pong.asm | Pong/Pong.asm | processor 6502
include "vcs.h"
include "macro.h"
SEG
ORG $F000
Reset
StartOfFrame
; Start of vertical blank processing
lda #0
sta VBLANK
lda #2
sta VSYNC
; 3 scanlines of VSYNCH signal...
sta WSYNC
sta WSYNC
sta WSYNC
lda #0
sta VSYNC
; 37 scanlines of vertical blank...
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
; 192 scanlines of picture...
ldx #0
REPEAT 192; scanlines
inx
stx COLUBK
sta WSYNC
REPEND
lda #%01000010
sta VBLANK ; end of screen - enter blanking
; 30 scanlines of overscan...
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
jmp StartOfFrame
ORG $FFFA
.word Reset ; NMI
.word Reset ; RESET
.word Reset ; IRQ
END
| Add in example that was provided to create a basic "kernel" for the atari game for rendering to the screen. | Add in example that was provided to create a basic "kernel" for the atari game for rendering to the screen.
| Assembly | mit | dacampbell/Atari2600Games,dacampbell/Atari2600Games | |
f576d5346c0ef5fe5b4c2eb6f3f7f1d7395f276d | src/scenes/peron/index.asm | src/scenes/peron/index.asm | //============================================================
// .efo header
//============================================================
.pc = $0
.text "EFO2" // fileformat magic
.word prepare // prepare routine
.word setup // setup routine
.word interrupt // irq handler
.word 0 // main routine
.word 0 // fadeout routine
.word 0 // cleanup routine
.word 0 // location of playroutine call
// tags
//.byt "P", $04, $07 // range of pages in use
//.byt "I",$10,$1f // range of pages inherited
//.byt "Z",$02,$03 // range of zero-page addresses in use
//.byt "S" // i/o safe
//.byt "X" // avoid loading
//.byt "M",<play,>play // install music playroutine
.byte 0 // end-of-tags
.word load_addr
load_addr:
.import source "init.asm"
.import source "fx.asm"
.import source "main.asm"
| //============================================================
// .efo header
//============================================================
.pc = $2000
.text "EFO2" // fileformat magic
.word prepare // prepare routine
.word setup // setup routine
.word interrupt // irq handler
.word 0 // main routine
.word 0 // fadeout routine
.word 0 // cleanup routine
.word 0 // location of playroutine call
// tags
//.byt "P", $04, $07 // range of pages in use
//.byt "I",$10,$1f // range of pages inherited
//.byt "Z",$02,$03 // range of zero-page addresses in use
//.byt "S" // i/o safe
//.byt "X" // avoid loading
//.byt "M",<play,>play // install music playroutine
.byte 0 // end-of-tags
.word load_addr
load_addr:
.import source "init.asm"
.import source "fx.asm"
.import source "main.asm"
| Fix load address - still not working :( | Fix load address - still not working :(
| Assembly | cc0-1.0 | c64scene-ar/c64demo,c64scene-ar/c64demo,c64scene-ar/c64demo |
845306b03bebfcd354d1266f960fb1632fe374ca | Tools/System/TaskSwapHandler.asm | Tools/System/TaskSwapHandler.asm | taskswapHandler :
pop ecx ; pop eip into ecx
pusha
mov ebx, [currentTaskNum] ; get the current task
imul ebx, TASK_OBJ_SIZE
add ebx, RunningTaskList
mov [ebx+Task_eip], ecx
mov [ebx+Task_stackLoc], esp ; store the relevent things
; get the next Task object into ebx
taskswapHandler.goLoop :
add ebx, TASK_OBJ_SIZE
cmp ebx, RunningTaskListEnd
jge taskswapHandler.doneZeroing
mov ebx, RunningTaskList
taskswapHandler.doneZeroing :
cmp dword [ebx+Task_id], 0
je taskswapHandler.goLoop
taskswapHandler.noloopback :
mov esp, [ebx+Task_stackLoc]
popa
push dword [ebx+Task_eip]
iret
currentTaskNum :
dd 0x0
RunningTaskList :
times 32*TASK_OBJ_SIZE db 0x0 ; 32 tasks max atm
RunningTaskListEnd :
Task_id equ 0x0
Task_stackLoc equ 0x4
Task_eip equ 0x8
TASK_OBJ_SIZE equ 0xC
registerTask : ; eip in ecx
pusha
mov ebx, RunningTaskList
registerTask.loop :
cmp dword [ebx+Task_id], 0
je registerTask.foundTask
add ebx, TASK_OBJ_SIZE
jmp registerTask.loop
registerTask.foundTask :
mov eax, [currentTaskId]
mov [ebx+Task_id], eax
mov [ebx+Task_eip], ecx
add eax, 1
mov [currentTaskId], eax
mov edx, ebx
sub eax, 1
mov ebx, TASK_STACK_SIZE
call Guppy.malloc
add ebx, TASK_STACK_SIZE*0x200
mov [edx+Task_stackLoc], ebx
popa
ret
unregisterTask : ; ID in ecx
pusha
mov ebx, RunningTaskList
unregisterTask.loop :
cmp dword [ebx+Task_id], ecx
je unregisterTask.foundTask
unregisterTask.foundTask :
xor ecx, ecx
mov [ebx+Task_id], ecx
popa
ret
currentTaskId :
dd 0x0
TASK_STACK_SIZE equ 2
| Add completely untested multitasking code | Add completely untested multitasking code | Assembly | mit | jaredwhitney/os3,jaredwhitney/os3 | |
217a20c9be293976ed17ef3326db18362752143c | Assembly/textbox/menu_items_effect.asm | Assembly/textbox/menu_items_effect.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
;; Item effect
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
;; Slot color
.org 0x021170DE
MOV R1, #0x9E - 4 ; X POS
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
;; Item effect
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
;; Slot color
.org 0x021170DE
MOV R1, #0x9E - 4 ; X POS
.thumb
;; Increase the size of the item name textbox
.org 0x02116E90
MOV R0, #0x14 + 1 ; Width / 8
| Increase textbox width of item name in menu | Increase textbox width of item name in menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
6474affb360a249f36881e88b7b326fc908f6762 | asm/por_fix_martial_art_bonus_str.asm | asm/por_fix_martial_art_bonus_str.asm | .nds
.relativeinclude on
.erroronwarning on
; In vanilla PoR Martial Art does not take bonus STR (e.g. from STR Boost) into account when calculating its damage.
; This patch causes it to take bonus STR into account.
.open "ftc/overlay9_0", 021CDF60h
.org 0x022176CC
ldrsh r1, [r4, 18h] ; Load bonus STR from 02111FEC
add r0, r0, r1 ; Add base STR (already in r0) to bonus STR
mov r0, r0, lsl 1h ; Double the strength value to get the damage martial art should do (same as in vanilla, except in vanilla it used float multiplication instead of shifting)
nop
nop
.close
| Add PoR patch to fix bonus STR not affecting martial art | Add PoR patch to fix bonus STR not affecting martial art
| Assembly | mit | LagoLunatic/DSVEdit | |
3cfb4ad0c72c561563883beff4ff05a6c68e7768 | examples/checkout-kata.asm | examples/checkout-kata.asm | ; Based on http://codekata.com/kata/kata09-back-to-the-checkout/
org 8000h
include src/zx-spec.asm
spec_init
describe 'price'
it 'Returns 0 for no items'
ld a,$FF
call price
assert_a_equal 0
spec_end
price proc
ret
endp
end 8000h | ; Based on http://codekata.com/kata/kata09-back-to-the-checkout/
org 8000h
include src/zx-spec.asm
spec_init
describe 'price'
it 'Returns 0 for no items'
ld a,$FF
call price
assert_a_equal 0
spec_end
price proc
ld a,0
ret
endp
end 8000h | Return 0 for no items | Return 0 for no items
| Assembly | mit | rhargreaves/zx-spec |
05ccf60f3610fd9e20dce20770232a4b552451cc | asm/ooe_wygol_unlocked_at_start.asm | asm/ooe_wygol_unlocked_at_start.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_22", 02223E00h
; Shanoa mode: Makes Ecclesia and Wygol be unlocked from the start.
.org 0x0223B7F4 ; Code that would normally set Ecclesia as the default unlocked area.
ldr r14, =021003CCh
ldr r0, [r14]
mov r1, 0x0000003C ; Sets both bits for Ecclesia and Wygol
orr r0, r0, r1
str r0, [r14]
b 0223B840h
.pool
.close
| Add patch to make wygol unlocked from the start in OoE | Add patch to make wygol unlocked from the start in OoE
| Assembly | mit | LagoLunatic/DSVEdit | |
d90e3fd5ad403410bbb51a498e9721527d260ec7 | RoadRunner/programs/cachetest2.asm | RoadRunner/programs/cachetest2.asm | LLB R1, 70 #Address
LHB R1, 0xCC
LLB R2, 59
LLB R12, 34
LLB R13, 45
LLB R14, 78
SW R1, R1, 0
SW R12, R1, 1
SW R13, R1, 2
SW R14, R1, 3
LW R3, R1, 0
ADD R4, R2, R2
LW R7, R1, 1
ADD R4, R4, R4
LW R8, R1, 2
ADD R4, R4, R4
LW R9, R1, 3
ADD R4, R4, R4
SW R2, R1, 0
LW R5, R1, 1
LW R6, R1, 3
HLT | LLB R1, 0x70 #Address
LHB R1, 0xCC
LLB R2, 59
LLB R12, 34
LLB R13, 45
LLB R14, 78
SW R1, R1, 0
SW R12, R1, 1
SW R13, R1, 2
SW R14, R1, 3
LW R3, R1, 0
ADD R4, R2, R2
LW R7, R1, 1
ADD R4, R4, R4
LW R8, R1, 2
ADD R4, R4, R4
LW R9, R1, 3
ADD R4, R4, R4
SW R2, R1, 0
LW R5, R1, 1
LW R6, R1, 3
HLT | Write to 0x70 instead 46 | Write to 0x70 instead 46
| Assembly | mit | somethingnew2-0/CS552-CPU,somethingnew2-0/CS552-CPU,somethingnew2-0/CS552-CPU |
dace226187f0859b67a155c6b41763fd63075f19 | test/br2030823.asm | test/br2030823.asm | bits 64
VFMADDPD xmm0, xmm1, [0], xmm3
VFMADDPD xmm0, xmm1, xmm2, [0]
VFMADDPD ymm0, ymm1, [0], ymm3
VFMADDPD ymm0, ymm1, ymm2, [0] | bits 64
VFMADDPD xmm0, xmm1, [0], xmm3
VFMADDPD xmm0, xmm1, xmm2, [0]
VFMADDPD ymm0, ymm1, [0], ymm3
VFMADDPD ymm0, ymm1, ymm2, [0]
| Fix file with no final newline | test: Fix file with no final newline
Fix test/br2030823.asm, which had no final newline.
Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
| Assembly | bsd-2-clause | techkey/nasm,techkey/nasm,letolabs/nasm,techkey/nasm,Distrotech/nasm,letolabs/nasm,turingstudio/nasm,turingstudio/nasm,projedi/nasm,Distrotech/nasm,Distrotech/nasm,letolabs/nasm,projedi/nasm,techkey/nasm,projedi/nasm,turingstudio/nasm,Distrotech/nasm,projedi/nasm,turingstudio/nasm,projedi/nasm,techkey/nasm |
2e6f7c342d8ba2571d6603544d41b04436631dc8 | test/br3187743.asm | test/br3187743.asm | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin
;Testname=optimized; Arguments=-Ox -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin
bits 64
vlddqu xmm0,[edi]
vlddqu ymm0,[edi]
| Add test for BR 3187743 | test: Add test for BR 3187743
Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@gmail.com>
| Assembly | bsd-2-clause | Distrotech/nasm,letolabs/nasm,techkey/nasm,techkey/nasm,techkey/nasm,projedi/nasm,techkey/nasm,turingstudio/nasm,letolabs/nasm,techkey/nasm,turingstudio/nasm,Distrotech/nasm,projedi/nasm,projedi/nasm,projedi/nasm,Distrotech/nasm,projedi/nasm,turingstudio/nasm,Distrotech/nasm,turingstudio/nasm,letolabs/nasm | |
833d603b411693d910a5bbaf8902035e4cbddbe5 | asm64/amd64.masm/Tsc.asm | asm64/amd64.masm/Tsc.asm | ;
; Copyright Mehdi Sotoodeh. All rights reserved.
; <mehdisotoodeh@gmail.com>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that source code retains the
; above copyright notice and following disclaimer.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
include defines.inc
PUBPROC readTSC
rdtscp
shl rdx,32
xchg eax,edx
xchg rdx,rax
ret
ENDPROC readTSC
END
| ;
; Copyright Mehdi Sotoodeh. All rights reserved.
; <mehdisotoodeh@gmail.com>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that source code retains the
; above copyright notice and following disclaimer.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
include defines.inc
PUBPROC readTSC
rdtscp
shl rdx,32
add rax,rdx
ret
ENDPROC readTSC
END
| Include upper 32-bits of tsc. | Include upper 32-bits of tsc.
| Assembly | mit | jl777/curve25519,msotoodeh/curve25519,msotoodeh/curve25519 |
f22effe27d1a42bc6d20a45d2d8e4ce26397efa8 | asm/dos_prevent_multiple_cutscenes_in_first_room.asm | asm/dos_prevent_multiple_cutscenes_in_first_room.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch fixes issues that could happen in the first room of the castle if the player got one of the bad endings before seeing the cutscene with Hammer in that first room.
; The cutscene with Hammer would play at the same time as the bad ending cutscene, and could allow skipping the cutscene to get out of the room, escaping from the bad ending.
@Overlay41Start equ 0x02308920
@FreeSpace equ @Overlay41Start + 0x1DC
.open "ftc/overlay9_0", 0219E3E0h
.org 0x021C84DC ; In Object5ECreate (cutscene in the first room of the castle with Hammer)
bne @CheckInBadEnding
.close
.open "ftc/overlay9_41", @Overlay41Start
.org @FreeSpace
@CheckInBadEnding:
ldr r1, =020F7188h ; Bitfield of event flags
ldr r1, [r1]
ands r1, r1, 24000h ; Check the two bad ending flags
beq 0x021C84F4 ; If neither are set, continue on with this event code
b 0x021C84E0 ; Otherwise, delete this event
.pool
.close
| Add patch to prevent overlapping events in first room of DoS | Add patch to prevent overlapping events in first room of DoS
| Assembly | mit | LagoLunatic/DSVEdit | |
1eeaaf04e26e14a87c8c8ae6f358cb83512016e1 | asm/ooe_boss_orb_reloads_room.asm | asm/ooe_boss_orb_reloads_room.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch makes it so getting a boss orb in Mystery Manor or Ecclesia will reload the room.
; This is because the cutscene after beating Albus/Barlowe won't play until the room is reloaded.
; Albus/Barlowe normally reload the room on defeat, but in boss randomizer something else needs to do it.
@Overlay86Start equ 0x022EB1A0
@FreeSpace equ 0x022EB1A0 + 0x48
.open "ftc/arm9.bin", 02000000h
.org 0x02061254 ; At the end of the function for the boss orb being picked up
b @BossOrbCheckReloadRoom
.close
.open "ftc/overlay9_86", @Overlay86Start ; Free space overlay
.org @FreeSpace
@BossOrbCheckReloadRoom:
ldr r0, =02100790h
ldrb r0, [r0] ; Read the current game mode
cmp r0, 0h ; Shanoa mode
bne @BossOrbCheckReloadRoomEnd
ldr r0, =020FFCB9h
ldrb r0, [r0] ; Read the current area index
cmp r0, 0Eh ; Mystery Manor
beq @BossOrbReloadRoomMysteryManor
cmp r0, 2h ; Ecclesia
bne @BossOrbCheckReloadRoomEnd
@BossOrbReloadRoomEcclesia:
mov r0, 2h ; Area, Ecclesia
mov r1, 0h ; Sector
mov r2, 6h ; Room
b @BossOrbReloadRoom
@BossOrbReloadRoomMysteryManor:
mov r0, 0Eh ; Area, Mystery Manor
mov r1, 0h ; Sector
mov r2, 9h ; Room
@BossOrbReloadRoom:
mov r3, 0C0h ; X pos
mov r4, 0B0h ; Y pos
str r3, [r13]
bl 0203AFD0h ; TeleportPlayer
bl 0203B014h ; TriggerRoomTransition
@BossOrbCheckReloadRoomEnd:
; Return to the normal boss orb code
add r13, r13, 34h ; Replace line overwritten to jump here
b 2061258h
.pool
.close
| Add patch for boss orbs to reload some boss rooms in OoE | Add patch for boss orbs to reload some boss rooms in OoE
| Assembly | mit | LagoLunatic/DSVEdit | |
0bd2565dd7884fc3526b814d19185625b0adf82b | test/movimm.asm | test/movimm.asm | bits 64
mov rax,1234567890abcdefh
mov eax,1234567890abcdefh
mov rax,dword 1234567890abcdefh
mov rax,qword 1234567890abcdefh
mov dword [rsi],1234567890abcdefh
mov qword [rsi],1234567890abcdefh
mov dword [rsi],dword 1234567890abcdefh
mov qword [rsi],dword 1234567890abcdefh
; mov qword [rsi],qword 1234567890abcdefh ; Error
; mov [rsi],qword 1234567890abcdefh ; Error
mov [rsi],dword 1234567890abcdefh
| Test of immediate handling on 64-bit mode | Test of immediate handling on 64-bit mode
| Assembly | bsd-2-clause | turingstudio/nasm,letolabs/nasm,Distrotech/nasm,techkey/nasm,letolabs/nasm,techkey/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,projedi/nasm,turingstudio/nasm,turingstudio/nasm,letolabs/nasm,projedi/nasm,projedi/nasm,Distrotech/nasm,turingstudio/nasm,Distrotech/nasm,techkey/nasm,techkey/nasm,projedi/nasm | |
a5cc0581c743ae6b7d9709483e73fd5db0ee1515 | asm/ooe_no_shanoa_back_glow.asm | asm/ooe_no_shanoa_back_glow.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch makes the color at index 2 in Shanoa's palette (the glyph on her back) not glow and switch between colors automatically.
.open "ftc/arm9.bin", 02000000h
.org 0x0208C990
nop
.close
| Add patch to remove Shanoa back glow | Add patch to remove Shanoa back glow
| Assembly | mit | LagoLunatic/DSVEdit | |
8947bb2ef571fc97290b7275170f7677e38880e7 | Assembly/keyboard/font_space.asm | Assembly/keyboard/font_space.asm | ;;----------------------------------------------------------------------------;;
;; Reduce the font space
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
.org 020C64E0h
.area 4h
MOV R1, #8 - 4
.endarea
| ;;----------------------------------------------------------------------------;;
;; Reduce the font space
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
.org 020C64E0h
.area 4h
MOV R1, #8 - 8
.endarea
| Remove any space between chars | Keyboard: Remove any space between chars
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
043ee65f202361d581327b1f6caddfa704a0f644 | Assembly/textbox/menu_familiars.asm | Assembly/textbox/menu_familiars.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in familiars menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
;; # FAMILIAR DESCRIPTION #
.org 020B6770h
MOV r4, #0x9A ; Y Position: original 0x97
.org 020B677Ch
MOV r1, #8 ; X Position: original 0x08
;; # FAMILIAR OBJECTS #
.org 020B6604h
MOV r1, #0x73 ; X Position: Original 0x74
ADD r2, r2, #0x6B ; Y Position: Original 0x6B
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in familiars menu
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
;; # FAMILIAR DESCRIPTION #
.org 020B6770h
MOV r4, #0x9A ; Y Position: original 0x97
.org 020B677Ch
MOV r1, #8 ; X Position: original 0x08
;; # FAMILIAR OBJECTS #
.org 020B6604h
MOV r1, #0x73 ; X Position: Original 0x74
ADD r2, r2, #0x6B ; Y Position: Original 0x6B
;; # MONEY GIVEN #
.org 020B671Ch
MOV R1, #0xCD + 9 ; X Position
| Fix familiar money give number position | Fix familiar money give number position
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
b048324b9e6ba43b1add7c4dbbab61b1b1297a2d | test/gotoff64.asm | test/gotoff64.asm | ;Testname=noerr; Arguments=-felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
;Testname=err; Arguments=-DERROR -felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
bits 64
default rel
extern foo
mov r15,[foo wrt ..got]
lea r12,[foo wrt ..got]
%ifdef ERROR
lea rax,[foo wrt ..gotoff]
mov rax,[foo wrt ..gotoff]
%endif
default abs
mov r15,[foo wrt ..got]
lea r12,[foo wrt ..got]
mov rax,[qword foo wrt ..got]
%ifdef ERROR
lea rax,[foo wrt ..gotoff]
mov rax,[foo wrt ..gotoff]
%endif
mov rax,[qword foo wrt ..gotoff]
| Test for various ELF64 GOT references | Test for various ELF64 GOT references
Try to test for various GOT references in ELF64.
Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
| Assembly | bsd-2-clause | projedi/nasm,projedi/nasm,projedi/nasm,Distrotech/nasm,letolabs/nasm,letolabs/nasm,techkey/nasm,Distrotech/nasm,techkey/nasm,projedi/nasm,turingstudio/nasm,turingstudio/nasm,projedi/nasm,turingstudio/nasm,Distrotech/nasm,techkey/nasm,techkey/nasm,Distrotech/nasm,letolabs/nasm,turingstudio/nasm,techkey/nasm | |
e439132ec22e5fabaecb17d79d37787b55fc7112 | Assembly/textbox/casino_dialog.asm | Assembly/textbox/casino_dialog.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the casino dialogs
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
; Money number
.arm
.org 0x02134F78
MOV R1, #0x16 ; X pos, original 0x8
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the casino dialogs
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
; Money number
.arm
.org 0x02134F78
MOV R1, #0x16 ; X pos, original 0x8
; Number of coins
.org 0x02134FB0
MOV R1, #0x6E ; X pos, original 0x60
| Move number of casino coins | Move number of casino coins
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
39cfb70e65ce87f36044637b429b2d48b5cbcd2c | Assembly/textbox/menu_team.asm | Assembly/textbox/menu_team.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in team menu
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
;; Character face icon
.org 0x02130478
ADD R2, R2, #0x19 - 1 ; Y position
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in team menu
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.arm
;; Character face icon
.org 0x02130478
ADD R2, R2, #0x19 - 1 ; Y position
;; Health state
.org 0x02130A08
MOV R2, #0x2A + 1 ; Y position
| Move health state in team menu | Move health state in team menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
081fcfbdf1c36d1e6d8141daaefbe7e23ac20ad9 | src/context.asm | src/context.asm | .file "context.asm"
.text
.align 2
.global kernel_enter
.type kernel_enter, %function
kernel_enter:
mov r2, lr
mrs r3, spsr
msr cpsr, #0x9F /* system */
stmfd sp!, {r0, r2-r12, lr}
mov r2, sp
msr cpsr, #0x93 /* supervisor */
ldmfd sp!, {r4-r12, lr}
/* mov sp, #0x1000 */
b syscall_handle (PLT)
.size kernel_enter, .-kernel_enter
.align 2
.global kernel_exit
.type kernel_exit, %function
kernel_exit:
@ r0 holds address of user stack
stmfd sp!, {r4-r12, lr}
msr cpsr, #0x9F /* System */
mov sp, r0
ldmfd sp!, {r0, r2-r12, lr}
msr cpsr, #0x93 /* Supervisor */
msr spsr, r3
movs pc, r2
.size kernel_exit, .-kernel_exit
| .file "context.asm"
.text
.align 2
.global kernel_enter
.type kernel_enter, %function
kernel_enter:
mov r2, lr
mrs r3, spsr
msr cpsr, #0x9F /* system */
stmfd sp!, {r0, r2-r12, lr}
mov r2, sp
msr cpsr, #0x93 /* supervisor */
ldmfd sp!, {r4-r12, lr}
/* mov sp, #0x100000 */
b syscall_handle (PLT)
.size kernel_enter, .-kernel_enter
.align 2
.global kernel_exit
.type kernel_exit, %function
kernel_exit:
@ r0 holds address of user stack
stmfd sp!, {r4-r12, lr}
msr cpsr, #0x9F /* System */
mov sp, r0
ldmfd sp!, {r0, r2-r12, lr}
msr cpsr, #0x93 /* Supervisor */
msr spsr, r3
movs pc, r2
.size kernel_exit, .-kernel_exit
| Set the stack-less kernel stack to a safe value | Set the stack-less kernel stack to a safe value | Assembly | mit | ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme |
bb4edad1c198a76294e8d6becdd3733663d837b4 | conf/S21_ApplePi_sample.asm | conf/S21_ApplePi_sample.asm | # Example code, just demonstrating each instruction
add $2 $0
sub $3 $1
rand $4 5
label:
load $6 $7
store $8 $9
jal label
jr $10
beq $11 label
bgt $12 label
set $13 $14
seti $15 16
| Add sample code for ApplePi. | Add sample code for ApplePi.
| Assembly | mit | liffiton/256asm,liffiton/256asm | |
cb327ab25a80f57f859129a361acbc9186999a1e | 3/src/sdtest/sdtest.rom.asm | 3/src/sdtest/sdtest.rom.asm | x0 = 0
ra = 1
dsp = 2
rsp = 3
gp = 4
gvp = 5
x16 = 16
x17 = 17
x18 = 18
include "sdtest.asm"
; exit the emulator.
emu_exit:
andi x16, x16, 255
slli x16, x16, 8
addi rsp, rsp, -8
sd x16, 0(rsp)
csrrw x0, rsp, $780
jal x0, *
; Initialize the BSPL runtime environment.
; Then, kick off our tests.
_cold: addi rsp, x0, $400
add dsp, rsp, rsp
add gvp, dsp, dsp
jal x0, _
; CPU cold boots here.
adv $FFF00, $CC
jal x0, _cold
| zero = 0
ra = 1
dsp = 2 ; Data stack pointer.
rsp = 3 ; Return stack pointer.
gvp = 4 ; Global variables pointer.
gp = 13
dr16 = 5
dr17 = 6
dr18 = 7
dr19 = 8
dr20 = 9
dr21 = 10
dr22 = 11
dr23 = 12
x0 = 0
x16 = 16
x17 = 17
x18 = 18
include "sdtest.asm"
; exit the emulator.
emu_exit:
andi x16, x16, 255
slli x16, x16, 8
addi rsp, rsp, -8
sd x16, 0(rsp)
csrrw x0, rsp, $780
jal x0, *
; Initialize the BSPL runtime environment.
; Then, kick off our tests.
_cold: addi rsp, x0, $400
add dsp, rsp, rsp
add gvp, dsp, dsp
jal x0, _
; CPU cold boots here.
adv $FFF00, $CC
jal x0, _cold
| Make work with new BSPL ABI reqs | Make work with new BSPL ABI reqs
| Assembly | mpl-2.0 | sam-falvo/kestrel,KestrelComputer/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel,KestrelComputer/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel,sam-falvo/kestrel |
ef8b7ef57a894167d9ac21916655dd8351519f44 | yes.64.osx.nasm | yes.64.osx.nasm | global _main
global _start
extern _puts
section .text
_main:
add rsi, 8
_start:
push rdi
push rsi
comp:
sub rsp, 8
cmp rdi, 1
jg nz
je zero
nz:
mov rdi, [rsi]
jmp loop
zero:
mov rdi, y
loop:
call _puts
add rsp, 8
pop rsi
pop rdi
jmp _start
ret
section .data
y: db 'y'
| Implement yes in NASM for Mac OS X 64-bit | Implement yes in NASM for Mac OS X 64-bit
| Assembly | mit | mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes,mubaris/yes | |
a09b5b343780752cdec758a797d870efffda6f8d | asm/ooe_fix_lighthouse_other_entrances.asm | asm/ooe_fix_lighthouse_other_entrances.asm | .nds
.relativeinclude on
.erroronwarning on
; If the player enters the lighthouse from one of the top doors while Brachyura is still alive, they would normally get softlocked.
; This patch teleports the player to the bottom of the room in that case so they can fight Brachyura as normal.
; Also, if the player enters it from the bottom right door the wall there would softlock the player and prevent them from entering, so that wall is removed.
@Overlay86Start equ 0x022EB1A0
@FreeSpace equ 0x022EB1A0
.open "ftc/overlay9_53", 022C1FE0h
.org 0x022C3A68 ; Code that runs if misc flag 0 is not set, before initializing the breakable ceilings.
b @TeleportPlayerIfAtTop
.org 0x022C331C ; Code that calls GetEntitySlot to create the right wall.
mov r0, 0h ; Don't create the right wall.
.close
.open "ftc/overlay9_86", @Overlay86Start ; Free space overlay
.org @FreeSpace
@TeleportPlayerIfAtTop:
ldr r0, =02109850h
ldr r1, [r0, 4h] ; Load player's Y
cmp r1, 9C0h*1000h
movlt r2, 0A70h*1000h
strlt r2, [r0, 4h] ; If the player's Y is < 9C0 teleport them to the bottom of the room. This is in case they entered from one of the top doors.
movlt r2, 80h*1000h
strlt r2, [r0] ; Also change the player's X to be in the middle of the room.
ldr r0, =022CD3F4h ; Replaces the line of code we overwrote to jump to free space
b 022C3A6Ch ; Return
.pool
.close
| Add patch to prevent softlocks entering lighthouse from wrong door | Add patch to prevent softlocks entering lighthouse from wrong door
| Assembly | mit | LagoLunatic/DSVEdit | |
3e341dc73672f69ff2215f181d6889bb738daaec | Assembly/textbox/menu_items_effect.asm | Assembly/textbox/menu_items_effect.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
;; Item effect
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
;; Slot color
.org 0x021170DE
MOV R1, #0x9E - 4 ; X POS
| Move slot color in item menu | Move slot color in item menu
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
cc00498f5fd14d58bde0f7e32c9b777ca1b94600 | test/larlsl.asm | test/larlsl.asm | bits 64
lar ax,bx
lar ax,[rsi]
lar ax,word [rsi]
lar eax,bx
lar eax,[rsi]
lar eax,word [rsi]
lar rax,bx
lar rax,[rsi]
lar rax,word [rsi]
lsl ax,bx
lsl ax,[rsi]
lsl ax,word [rsi]
lsl eax,bx
lsl eax,[rsi]
lsl eax,word [rsi]
lsl rax,bx
lsl rax,[rsi]
lsl rax,word [rsi]
| Fix BR 1490407: size of the second operand of LAR/LSL | Fix BR 1490407: size of the second operand of LAR/LSL
The second operand of LAR/LSL is always 16 bits.
| Assembly | bsd-2-clause | turingstudio/nasm,Distrotech/nasm,letolabs/nasm,letolabs/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,projedi/nasm,turingstudio/nasm,projedi/nasm,Distrotech/nasm,projedi/nasm,turingstudio/nasm,Distrotech/nasm,techkey/nasm,letolabs/nasm,techkey/nasm,turingstudio/nasm,techkey/nasm,projedi/nasm,techkey/nasm | |
130d1a0e5bfaca767059cae2025733101126874b | asm/por_fix_death_softlock.asm | asm/por_fix_death_softlock.asm | .nds
.relativeinclude on
.erroronwarning on
; Fixes a vanilla bug where skipping the cutscene after you kill Death too quickly will prevent Death's boss death flag from being set.
; As a result of that bug the boss doors would relock after you exit the room, though Death himself wouldn't ever be fightable again.
.open "ftc/overlay9_64", 022D7900h
.org 0x022D8B18
nop
.close
| Add armips patch to fix the vanilla PoR death softlock | Add armips patch to fix the vanilla PoR death softlock
| Assembly | mit | LagoLunatic/DSVEdit | |
a39edd21352b729d4caccf20c5a817b3414e41da | asm/por_spells_always_fully_charged.asm | asm/por_spells_always_fully_charged.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 021CDF60h
; This patch makes Charlotte always use spells at full power, even when only half-charged.
.org 0x02214DC8 ; Where the base multiplier for a spell is located (usually 1).
addne r2, r4, 2h ; Change it to 2.
.org 0x021F1C40 ; Where the bonus multiplier you get for fully charging a spell is located (usually 1).
;movge r0, 0h ; Change it to 0. This is so fully charging a spell won't get a 3x multiplier, and instead it will stay at simply 2x (fully charged).
; You can remove the above two lines if you want fully charged spells to have a 3x multiplier, which actually does work correctly, making spells do 3x damage, and depending on the spell can even do other things like increasing the number of projectiles or the size of the projectiles past the normal limit.
; There are a few minor bugs if you choose to have spells with a 3x multiplier. For example, Spirit of Light will fire only 1 projectile instead of 3 like you'd expect, Ice Needles will all be grouped together instead of spread out among a circle, and Nightmare will use the smaller size instead of the bigger one.
.close
| Add patch to make spells always act fully charged | PoR: Add patch to make spells always act fully charged
| Assembly | mit | LagoLunatic/DSVEdit | |
646b662c625bd53134a92e61369c3f16a5a64574 | asm/por_always_show_drop_percentages.asm | asm/por_always_show_drop_percentages.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch causes you to always have the Gambler Glasses effect of showing percentages instead of star ratings for enemy drops.
.open "ftc/arm9.bin", 02000000h
.org 0x02053074 ; Checks if you have Gambler Glasses equipped to see if it should hide the stars.
mov r0, 2h ; Head armor 2, Gambler Glasses
.org 0x02053790 ; Checks if you have Gambler Glasses equipped to see if it should show the percentages.
mov r0, 2h ; Head armor 2, Gambler Glasses
.close
| Add patch to always show drop percentages in PoR | Add patch to always show drop percentages in PoR
| Assembly | mit | LagoLunatic/DSVEdit | |
3f77bf0faf6bc6710c49abe4e3f3939ea51ead63 | asm/dos_disable_sliding_puzzle.asm | asm/dos_disable_sliding_puzzle.asm | .nds
.relativeinclude on
.erroronwarning on
; Disables the special doors of the sliding puzzle in Demon Guest House.
.open "ftc/arm9.bin", 02000000h
.org 0x0202738C
; This is where, upon going through any door, the game would start checking your current sector/room indexes to see if the door you went through was a sliding puzzle door.
; The original code here had a return that was conditional and only ran if your sector index is not 1 (Demon Guest House).
; We change it to an unconditional return so the special behavior of the sliding puzzle doors never activates.
mov r0, 0h
pop r4-r8,r14
bx r14
.close
| Add ARMIPS patch to disable sliding puzzle | Add ARMIPS patch to disable sliding puzzle
| Assembly | mit | LagoLunatic/DSVEdit | |
90a4bfa171b4779067c734068e14e3c15b540a93 | src/fx/colorwash_sub.asm | src/fx/colorwash_sub.asm | //============================================================
// color washer routine
//============================================================
colwash:
lda color+$00 // load the current first color from table
sta color+$28 // store in in last position of table to reset the cycle
ldx #$00 // init X with zero
cycle1:
lda color+1,x // Start cycle by fetching next color in the table...
sta color,x // ...and store it in the current active position.
sta $d990,x // put into Color Ram
inx // increment X-Register
cpx #$28 // have we done 40 iterations yet?
bne cycle1 // if no, continue
colwash2:
lda color2+$28 // load current last color from second table
sta color2+$00 // store in in first position of table to reset the cycle
ldx #$28
cycle2:
lda color2-1,x // Start cycle by fetching previous color in the table...
sta color2,x // ...and store it in the current active position.
sta $d9df,x // put into Color Ram
dex // decrease iterator
bne cycle2 // if x not zero yet, continue
rts // return from subroutine | //============================================================
// color washer routine
//============================================================
colwash:
lda color+$00 // load the current first color from table
sta color+$27 // store in in last position of table to reset the cycle
ldx #$00 // init X with zero
cycle1:
lda color+1,x // Start cycle by fetching next color in the table...
sta color,x // ...and store it in the current active position.
sta $d990,x // put into Color Ram
inx // increment X-Register
cpx #$28 // have we done 40 iterations yet?
bne cycle1 // if no, continue
colwash2:
lda color2+$27 // load current last color from second table
sta color2+$00 // store in in first position of table to reset the cycle
ldx #$28
cycle2:
lda color2-1,x // Start cycle by fetching previous color in the table...
sta color2,x // ...and store it in the current active position.
sta $d9df,x // put into Color Ram
dex // decrease iterator
bne cycle2 // if x not zero yet, continue
rts // return from subroutine
| Fix last position offset on colorwasher fx | Fix last position offset on colorwasher fx
| Assembly | cc0-1.0 | c64scene-ar/c64demo,c64scene-ar/c64demo,c64scene-ar/c64demo |
8cbf74339247ad7e0f904ef8b76120ce37bd982d | src/entry.asm | src/entry.asm | [BITS 64]
%include "src/asm_routines/constants.asm"
global start
extern rust_main
section .entry
start:
; update segments
mov dx, gdt_selector_data ; data selector
mov ss, dx ; stack segment
mov ds, dx ; data segment
mov es, dx ; extra segment
mov fs, dx ; f-segment
mov gs, dx ; g-segment
; set up stack
mov esp, stack_top
; get to kernel
call rust_main
; rust main returned, print `OS returned!`
mov rax, 0x4f724f204f534f4f
mov [0xb8000], rax
mov rax, 0x4f724f754f744f65
mov [0xb8008], rax
mov rax, 0x4f214f644f654f6e
mov [0xb8010], rax
hlt
; reserve space for stack
section .bss
stack_bottom:
resb 4096
stack_top:
| [BITS 64]
%include "src/asm_routines/constants.asm"
global start
extern rust_main
section .entry
start:
; update segments
mov dx, gdt_selector_data ; data selector
mov ss, dx ; stack segment
mov ds, dx ; data segment
mov es, dx ; extra segment
mov fs, dx ; f-segment
mov gs, dx ; g-segment
; set up stack
mov rsp, stack_top
; get to kernel
call rust_main
; rust main returned, print `OS returned!`
mov rax, 0x4f724f204f534f4f
mov [0xb8000], rax
mov rax, 0x4f724f754f744f65
mov [0xb8008], rax
mov rax, 0x4f214f644f654f6e
mov [0xb8010], rax
hlt
; reserve space for stack
section .bss
stack_bottom:
resb 4096
stack_top:
| Use rsp as stack pointer, not esp | Use rsp as stack pointer, not esp
| Assembly | mit | Dentosal/rust_os,Dentosal/rust_os,Dentosal/rust_os |
ac4325decbd36ef93809ad2514fa3ecbb13068ac | boot.asm | boot.asm | ; JUMP.ASM
; Make a jump and then hang
; Tell the compiler that this is offset 0.
; It isn't offset 0, but it will be after the jump.
[ORG 0]
jmp 07C0h:start ; Goto segment 07C0
start:
; Update the segment registers
mov ax, cs
mov ds, ax
mov es, ax
hang: ; Hang!
jmp hang
times 510-($-$$) db 0
dw 0AA55h
| ; 1.ASM
; Print "====" on the screen and hang
; Tell the compiler that this is offset 0.
; It isn't offset 0, but it will be after the jump.
[ORG 0]
jmp 07C0h:start ; Goto segment 07C0
start:
; Update the segment registers
mov ax, cs
mov ds, ax
mov es, ax
mov ah, 9 ; Print "===="
mov al, '=' ;
mov bx, 7 ;
mov cx, 4 ;
int 10h ;
hang: ; Hang!
jmp hang
times 510-($-$$) db 0
dw 0AA55h
| Print "===" to the screen | Print "===" to the screen
| Assembly | mit | wconrad/brazzle,wconrad/brazzle |
186b533425405ac4e1172c7f0e6751848f04aabd | test/relocs.asm | test/relocs.asm | bits 64
extern foo
mov eax,[foo]
mov rax,[foo]
mov rax,[qword foo]
mov eax,foo
mov rax,dword foo
mov rax,qword foo
dd foo
dq foo
| Add a test for various 32- and 64-bit relocations | test: Add a test for various 32- and 64-bit relocations
Test signedness in a couple of different contexts.
Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
| Assembly | bsd-2-clause | techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm | |
e9d3e86d70b11800541e55756619684dbfc1ca97 | load.asm | load.asm | bits 32
section .text
align 4
dd 0x1BADB002
dd 0x00
dd - (0x1BADB002 + 0x00)
global start
extern main
start:
cli
mov esp, kstack
call main
hlt
section .bss
resb 8192
kstack:
| bits 32
section .text
align 4
dd 0x1BADB002
dd 0x00
dd - (0x1BADB002 + 0x00)
global start
extern entry
start:
cli
mov esp, kstack
call entry
hlt
section .bss
resb 8192
kstack:
| Change name of entry function | Change name of entry function
| Assembly | mit | Magical-Chicken/simple-x86-kernel,Magical-Chicken/simple-x86-kernel |
871ea6a59e16d35b35f1de5fc13a8b1117db92ca | asm/dos_add_hole_to_map_doors.asm | asm/dos_add_hole_to_map_doors.asm | .nds
.relativeinclude on
.erroronwarning on
; This adds a single pixel hole to all doors drawn on the map to increase visibility, like in PoR and OoE.
@Overlay41Start equ 0x02308920
@FreeSpace equ @Overlay41Start + 0x108
.open "ftc/arm9.bin", 02000000h
.org 0x020240B0
; Handles drawing left/right doors on the left edge of even-numbered columns.
bne @DrawLeftRightDoorEvenColumn
nop
nop
.org 0x020240FC
; Handles drawing left/right doors on the left edge of odd-numbered columns.
bne @DrawLeftRightDoorOddColumn
nop
nop
.org 0x020242A8
; Handles drawing up/down doors in even-numbered columns.
; 3 is the index of the door color in the palette, while 1 is the index of the room fill color in the palette.
.word 0x00003133
.org 0x020242B4
; Handles drawing up/down doors in odd-numbered columns.
.word 0x31330000
.close
.open "ftc/overlay9_41", @Overlay41Start
.org @FreeSpace
@DrawLeftRightDoorEvenColumn:
cmp r4, 2 ; On the center pixel of an even-numbered row, skip drawing the door pixel
beq 2024138h
cmp r4, 6 ; On the center pixel of an odd-numbered row, skip drawing the door pixel
beq 2024138h
; If we're not on a center pixel, simply draw the door pixel like the original code did and return.
orr r0, r0, 3h
str r0, [r5, r4, lsl 2h]
b 2024138h
@DrawLeftRightDoorOddColumn:
cmp r4, 2 ; On the center pixel of an even-numbered row, skip drawing the door pixel
beq 2024138h
cmp r4, 6 ; On the center pixel of an odd-numbered row, skip drawing the door pixel
beq 2024138h
; If we're not on a center pixel, simply draw the door pixel like the original code did and return.
orr r0, r0, 30000h
str r0, [r5, r4, lsl 2h]
b 2024138h
.close
| Add patch to add holes into the doors on the map for DoS | Add patch to add holes into the doors on the map for DoS
| Assembly | mit | LagoLunatic/DSVEdit | |
41de71e033292b5aa0721882e01576fa68c5e927 | asm/dos_melee_balore_blocks.asm | asm/dos_melee_balore_blocks.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This makes it so that all melee weapons can break balore blocks, not just Julius's whip.
.org 0x02212AB0 ; Branch of a switch statement taken for all melee weapons except Julius's whip.
b 02212D64h ; Instead take the branch taken for Julius's whip.
.close
| .nds
.relativeinclude on
.erroronwarning on
.open "ftc/overlay9_0", 0219E3E0h
; This makes it so that all melee weapons can break balore blocks, not just Julius's whip.
.org 0x02212AB0 ; Branch of a switch statement taken for all melee weapons except Julius's whip.
b 02212D64h ; Instead take the branch taken for Julius's whip.
; Next we need to make sure the player has Balore's soul.
.org 0x02212E94 ; Line in the whip code that would normally call 021D5210 to break the blocks.
b @CheckDestroyBaloreBlocks ; Instead jump to our own code to check if the player has Balore's soul.
.close
.open "ftc/arm9.bin", 02000000h
.org 0x020C0290 ; Free space
@CheckDestroyBaloreBlocks:
mov r5, r14
mov r0, 0h
bl 0220F81Ch
cmp r0, 1h ; Check if Balore soul is active.
beq @DestroyBaloreBlocks ; Destroy blocks if it is.
ldr r0,=020F740Eh
ldrb r0, [r0]
cmp r0, 1h ; Otherwise check if the current player character is Julius.
beq @DestroyBaloreBlocks ; Destroy blocks if it is.
b 02212E98h ; Didn't meet either condition, so return without destroying them.
@DestroyBaloreBlocks:
mov r0, r5
mov r1, r12
mov r2, r4
bl 021D5210h ; Call function to destroy blocks.
b 02212E98h ; Return
.pool
.close
| Update patch to break balore blocks | Update patch to break balore blocks
| Assembly | mit | LagoLunatic/DSVEdit |
840952078824e3e8f5d9f276b519af2c9cd02aae | src/test/resources/kilobyte/simulator/exit_statement_mid_program.asm | src/test/resources/kilobyte/simulator/exit_statement_mid_program.asm | add $t0, $t1, $t2
sub $s0, $t0, $v0
exit
beq $3, $8, 3
nop
nop | add $t0, $t1, $t2
sub $s0, $t0, $v0
exit
add $t0, $t1, $t2
nop
nop | Remove the branch for clarity | Remove the branch for clarity
| Assembly | mit | leksak/kilobyte,leksak/kilobyte,leksak/kilobyte |
4da4a74a25100e2092e85edea693d5cbb7dbccad | asm/por_allow_changing_starting_room.asm | asm/por_allow_changing_starting_room.asm | .nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
.org 0x02051F90 ; Where the original game's code for loading area/sector/room indexes is.
b 020BFC00h ; Jump to some free space, where we will put our own code for loading the area/sector/room indexes.
.org 0x020BFC00 ; Free space.
mov r5,0h ; Load the area index into r5.
strb r5,[r0,515h] ; Store the area index to the ram address where r0 will read it later. (0x02111785)
mov r5,0h ; Load the sector index into r5.
mov r4,0h ; Load the room index into r4.
b 02051F94h ; Return to where we came from.
.close
| .nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
.org 0x02051F90 ; Where the original game's code for loading area/sector/room indexes is.
b 020BFC00h ; Jump to some free space, where we will put our own code for loading the area/sector/room indexes.
.org 0x020BFC00 ; Free space.
mov r5,0h ; Load the area index into r5.
strb r5,[r0,515h] ; Store the area index to the ram address where r0 will read it later. (0x02111785)
mov r5,0h ; Load the sector index into r5.
mov r4,0h ; Load the room index into r4.
b 02051F94h ; Return to where we came from.
.org 0x02051F80 ; The case statement for Old Axe Armor mode's starting room initialization.
b 0x02051F88 ; Change it to take the same branch as the other three modes.
.close
| Fix changing starting room in PoR not changing Old Axe Armor mode's starting room | Fix changing starting room in PoR not changing Old Axe Armor mode's starting room
| Assembly | mit | LagoLunatic/DSVEdit |
0819e3b9a726c8ff905670409504b15d0f569cbf | test/jmp64.asm | test/jmp64.asm | bits 64
jmp rcx
call [rax]
call qword [rdx]
| ;Testname=test; Arguments=-fbin -ojmp64.bin; Files=.stdout .stderr jmp64.bin
bits 64
jmp rcx
jmp [rax]
jmp qword [rax]
jmp far [rax]
jmp far dword [rax]
jmp far qword [rax]
call rcx
call [rax]
call qword [rax]
call far [rax]
call far dword [rax]
call far qword [rax]
| Add more 64-bit jump tests | Add more 64-bit jump tests
| Assembly | bsd-2-clause | projedi/nasm,turingstudio/nasm,projedi/nasm,Distrotech/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,letolabs/nasm,techkey/nasm,turingstudio/nasm,Distrotech/nasm,techkey/nasm,turingstudio/nasm,letolabs/nasm,projedi/nasm,turingstudio/nasm,techkey/nasm,letolabs/nasm,Distrotech/nasm,projedi/nasm,techkey/nasm |
75eb05dd95b29cae3bc5ea08997eecb681f5bc48 | Assembly/textbox/menu_items_effect.asm | Assembly/textbox/menu_items_effect.asm | ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
;; Item effect
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
;; Slot color
.org 0x021170DE
MOV R1, #0x9E - 4 ; X POS
.thumb
;; Increase the size of the item name textbox
.org 0x02116E90
MOV R0, #0x14 + 1 ; Width / 8
| ;;----------------------------------------------------------------------------;;
;; Align the position of the textbox in the effect of items
;; Copyright 2014 Benito Palacios (aka pleonex)
;;
;; 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 or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;----------------------------------------------------------------------------;;
.thumb
;; Item effect
.org 0x02117D4E
MOV R1, #0x60 ; X POS -> Original 0x62
;; Slot color
.org 0x021170DE
MOV R1, #0x9E - 4 ; X POS
.thumb
;; Increase the size of the item name textbox
.org 0x02116E90
MOV R0, #0x14 + 2 ; Width / 8
| Increase items name textbox size | Increase items name textbox size
| Assembly | apache-2.0 | pleonex/Ninokuni,pleonex/Ninokuni,pleonex/Ninokuni |
7f41e6fe4852c96204f9ee08d4994fcdc5139c4e | tests/nasm/mov_sreg.asm | tests/nasm/mov_sreg.asm | global _start
section .data
align 16
mydword:
dd 0
%include "header.inc"
; 32-bit register move should set higher bits to zero
mov eax, -1
mov eax, ss
and eax, 0xffff0000
; 32-bit memory move should preserver higher bits
mov dword [mydword], 0xdeadbeef
mov [mydword], ss
mov ebx, [mydword]
and ebx, 0xffff0000
%include "footer.inc"
| Test for mov [mem], sreg | Test for mov [mem], sreg
| Assembly | bsd-2-clause | copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86 | |
f7b5725aa0e6de2e67100d38e6ab8bdd75a23878 | asm/dos_reveal_map.asm | asm/dos_reveal_map.asm | .nds
.relativeinclude on
.erroronwarning on
; Makes the entire map visible but greyed out from the start.
.open "ftc/arm9.bin", 02000000h
.org 0x020220C4
; Make the game not care if you have the map items and just always draw unvisited tiles.
mov r1, r8
nop
.org 0x02024BE8
; Makes rooms never be counted as secret rooms, since secret rooms don't show up even if the game thinks you have the map for that area.
mvn r0, 0h
bx r14
.close
| Add patch to reveal whole map from the start for DoS | Add patch to reveal whole map from the start for DoS
| Assembly | mit | LagoLunatic/DSVEdit | |
8fea62d712e73b4f8d853fd6f6b360941c5d13b5 | print/print_string.asm | print/print_string.asm | ; =============================================================================
; Copyright (C) 2015 Manolis Fragkiskos Ragkousis -- see LICENSE.TXT
; =============================================================================
;;; Print routine
;;; I push all the register to the stack.
;;; Set the bios routine for printing in the screen
;;; Move to al the data that bx points
;;; Generate the interrupt.
;;; Pop all registers from the stack
;;; Return to where the pc pointed to before getting in here.
;;; bx contains routine argument
%ifndef PRINT_STRING_16BIT
%define PRINT_STRING_16BIT
print_string:
pusha
mov ah, 0x0e
compare:
cmp byte [bx], 0
je exit
jmp print
print:
mov al, [bx]
int 0x10
add bx, 1
jmp compare
exit:
popa
ret
%endif
| ; =============================================================================
; Copyright (C) 2015 Manolis Fragkiskos Ragkousis -- see LICENSE.TXT
; =============================================================================
;;; Print routine
;;; I push all the register to the stack.
;;; Set the bios routine for printing in the screen
;;; Move to al the data that bx points
;;; Generate the interrupt.
;;; Pop all registers from the stack
;;; Return to where the pc pointed to before getting in here.
;;; bx contains routine argument
%ifndef PRINT_STRING_16BIT
%define PRINT_STRING_16BIT
[bits 16]
print_string:
pusha
mov ah, 0x0e
print_loop:
mov al, [bx]
cmp al, 0
je print_exit
int 0x10
inc bx
jmp print_loop
print_exit:
popa
ret
%endif
| Rewrite the 16bit print routine. | Rewrite the 16bit print routine.
* print/print_string.asm: Rewrite.
| Assembly | mit | Phant0mas/MaRagOS |
a926090cb9af5ffcd2dff7ff3659083fac23a5ed | resources/assets/ccl/asm/hooks.asm | resources/assets/ccl/asm/hooks.asm | list n_IItemRenderer
GETSTATIC net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.instance : Lnet/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer;
ALOAD 1
INVOKEVIRTUAL net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.renderByItem (Lnet/minecraft/item/ItemStack;)V
GOTO LEND #end of if statement
list IItemRenderer
ALOAD 2
INSTANCEOF codechicken/lib/render/IItemRenderer
IFEQ LELSE
ALOAD 2
ALOAD 1
INVOKEINTERFACE codechicken/lib/render/IItemRenderer.renderItem (Lnet/minecraft/item/ItemStack;)V
GOTO LEND
LELSE | list n_IItemRenderer
GETSTATIC net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.field_147719_a : Lnet/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer;
ALOAD 1
INVOKEVIRTUAL net/minecraft/client/renderer/tileentity/TileEntityItemStackRenderer.func_179022_a (Lnet/minecraft/item/ItemStack;)V
GOTO LEND #end of if statement
list IItemRenderer
ALOAD 2
INSTANCEOF codechicken/lib/render/IItemRenderer
IFEQ LELSE
ALOAD 2
ALOAD 1
INVOKEINTERFACE codechicken/lib/render/IItemRenderer.renderItem (Lnet/minecraft/item/ItemStack;)V
GOTO LEND
LELSE | Fix srg mapping in hook (round 2) | Fix srg mapping in hook (round 2)
| Assembly | lgpl-2.1 | Chicken-Bones/CodeChickenLib,alexbegt/CodeChickenLib,TheCBProject/CodeChickenLib |
6308ebb384c10a3f91104d6f27a7f46cf24a8afd | asm/dos_hide_tower_boss_until_top_floor.asm | asm/dos_hide_tower_boss_until_top_floor.asm | .nds
.relativeinclude on
.erroronwarning on
; This patch for the boss randomizer prevents the boss in Gergoth's tower from being loaded in until the player enters the top floor of the tower.
; In order for the patch to work correctly, the boss entity should be at index 1 and the tower floors entity should be at index 0 (reversed from how they are in vanilla).
@Overlay41Start equ 0x02308920
@FreeSpace equ @Overlay41Start + 0x288
.open "ftc/overlay9_0", 0219E3E0h
.org 0x0219F08C ; Near the end of the create function for object 18 (tower floors)
b @LoadOrUnloadTowerBoss
.close
.open "ftc/overlay9_41", @Overlay41Start
.org @FreeSpace
@LoadOrUnloadTowerBoss:
ldr r1, =020F70CCh ; Pointer to the current room's entity list
ldr r1, [r1]
add r1, r1, 11h ; Add 0x11 (0xC + 0x5) to the start of the entity list to get a pointer to the type byte of the second entity in the list, which is the boss entity.
; The last check done before the custom code was checking if r0 is equal to 0. If it is it means the player is on the top floor of the tower, so the boss should be loaded.
beq @AllowTowerBossToBeLoaded
@DoNotAllowTowerBossToBeLoaded:
mov r0, 0h ; Set the type of the boss entity to 0, so it's doesn't load any entity in.
b @FinishLoadingOrUnloadingTowerBoss
@AllowTowerBossToBeLoaded:
mov r0, 1h ; Set the type of the boss entity to 0, so it works properly as an enemy.
@FinishLoadingOrUnloadingTowerBoss:
strb r0, [r1] ; Store the type to the entity list.
; Replace the code we overwrote to jump here.
beq 0x0219F0AC ; Return from function if on the top floor.
b 0x0219F098 ; If not on the top floor, do some other stuff before returning.
.pool
.close
| Add patch to fix DoS tower boss in boss rando | Add patch to fix DoS tower boss in boss rando
| Assembly | mit | LagoLunatic/DSVEdit | |
d7b34ec7dd2231150cada807fe37753fe3433f79 | 6502DotNet/Examples/vcs/backgroundcycle.asm | 6502DotNet/Examples/vcs/backgroundcycle.asm | .cpu "6502"
.target "flat"
* = $F000
BackgroundColor = $80
VSYNC = $00
VBLANK = $01
WSYNC = $02
COLUBK = $09
TIM64T = $296
INTIM = $284
Start
SEI
CLD
LDX #$FF
TXS
LDA #0
ClearMem
STA 0,X
DEX
BNE ClearMem
MainLoop
LDA #%00000010
STA VSYNC
STA WSYNC
STA WSYNC
STA WSYNC
LDA #43
STA TIM64T
LDA #0
STA VSYNC
INC BackgroundColor
LDA BackgroundColor
STA COLUBK
WaitForVBlankEnd
LDA INTIM
BNE WaitForVBlankEnd
STA WSYNC
STA VBLANK
LDY #192
ScanLoop
STA WSYNC
DEY
BNE ScanLoop
LDA #2
STA WSYNC
STA VBLANK
LDY #30
OverScanWait
STA WSYNC
DEY
BNE OverScanWait
JMP MainLoop
// Special memory locations. Tells the 6502 where to go.
* = $FFFC
.word Start
.word Start | Add basic background cycler example that is confirmed to work with 6502.Net. | Add basic background cycler example that is confirmed to work with 6502.Net.
| Assembly | mit | Yttrmin/CSharpTo2600,Yttrmin/CSharpTo2600,Yttrmin/CSharpTo2600 | |
6745d722f447a7489832746c614024a5dd4cd5a7 | test/addr64x.asm | test/addr64x.asm | bits 64
mov rdx,[rax]
mov eax,[byte rsp+0x01]
mov eax,[byte rsp-0x01]
mov eax,[byte rsp+0xFF]
mov eax,[byte rsp-0xFF]
mov eax,[rsp+0x08]
mov eax,[rsp-0x01]
mov eax,[rsp+0xFF]
mov eax,[rsp-0xFF]
mov rax,[rsp+56]
mov [rsi],dl
mov byte [rsi],'-'
mov [rsi],al
mov byte [rsi],' '
| Test of some addressing modes in 64-bit mode. | Test of some addressing modes in 64-bit mode.
| Assembly | bsd-2-clause | projedi/nasm,letolabs/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,turingstudio/nasm,projedi/nasm,techkey/nasm,Distrotech/nasm,techkey/nasm,Distrotech/nasm,turingstudio/nasm,techkey/nasm,letolabs/nasm,projedi/nasm,turingstudio/nasm,techkey/nasm,letolabs/nasm,Distrotech/nasm,turingstudio/nasm,projedi/nasm | |
9d14a1085816f1b80444aca4985626a7e96f7d12 | test/floatb.asm | test/floatb.asm | ;; Known problematic floating-point numbers and their proper
;; encoding...
dd 1.1e10
dd 0x5023e9ac ; Should be...
dd 50.40e9
dd 0x513bc130 ; Should be...
dq 1.4e23
dq 0x44bda56a4b0835c0
dq 50.48e21
dq 0x44a5610d7502feae
dt 1.2e28
dq 0x9b18ab5df7180b6c
dw 0x405c
dt 50.46e25
dq 0xd0b29a67e95dcb60
dw 0x4057
| Add test for problematic floats | Add test for problematic floats
| Assembly | bsd-2-clause | techkey/nasm,Distrotech/nasm,projedi/nasm,techkey/nasm,letolabs/nasm,Distrotech/nasm,letolabs/nasm,projedi/nasm,letolabs/nasm,turingstudio/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,turingstudio/nasm,techkey/nasm,Distrotech/nasm,turingstudio/nasm,techkey/nasm,projedi/nasm,projedi/nasm,turingstudio/nasm | |
12fc7bc4b2c4864aedc5af595d8185e080a5bb4a | test/riprel.asm | test/riprel.asm | bits 64
; extern foo
mov rax,[foo]
mov rax,[123456789abcdef0h]
mov rbx,[foo]
mov rax,[dword foo]
mov rbx,[dword foo]
mov rax,[qword foo]
mov rax,[rel foo]
mov rbx,[rel foo]
mov rax,[rel dword foo]
mov rax,[rel qword foo]
mov rax,[es:foo]
mov rax,[es:123456789abcdef0h]
mov rbx,[es:foo]
mov rax,[dword es:foo]
mov rbx,[dword es:foo]
mov rax,[qword es:foo]
mov rax,[rel es:foo]
mov rbx,[rel es:foo]
mov rax,[rel dword es:foo]
mov rax,[rel qword es:foo]
mov rax,[fs:foo]
mov rax,[fs:123456789abcdef0h]
mov rbx,[fs:foo]
mov rax,[dword fs:foo]
mov rbx,[dword fs:foo]
mov rax,[qword fs:foo]
mov rax,[rel fs:foo]
mov rbx,[rel fs:foo]
mov rax,[rel dword fs:foo]
mov rax,[rel qword fs:foo]
section .data
foo equ $
| Add test cases for IP-relative addressing | Add test cases for IP-relative addressing
| Assembly | bsd-2-clause | projedi/nasm,turingstudio/nasm,turingstudio/nasm,letolabs/nasm,letolabs/nasm,Distrotech/nasm,projedi/nasm,projedi/nasm,projedi/nasm,techkey/nasm,Distrotech/nasm,projedi/nasm,techkey/nasm,techkey/nasm,turingstudio/nasm,Distrotech/nasm,Distrotech/nasm,techkey/nasm,techkey/nasm,letolabs/nasm,turingstudio/nasm | |
81670f01dc6f1688fcecad1d810007ffbab58163 | syzygy/pe/dos_stub.asm | syzygy/pe/dos_stub.asm | ; Copyright 2011 Google Inc.
;
; 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 or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
.286
.MODEL TINY, C
.CODE
PUBLIC end_dos_stub
begin_dos_stub PROC
; Fold the code and data segments, as our data is in this function.
; Note that begin_dos_stub is implicitly the start of the data segment.
push cs
pop ds
; Compute the distance to the string through this subtraction instead
; of e.g. a lea instruction to avoid the need for relocation entries
mov dx, message - begin_dos_stub
; Print the message to the console
mov ah, 09h
int 21h
; Terminate the program
mov ah, 00h
int 21h
message DB 'This is a Windows program, you cannot run it in DOS.\r\n$'
; Expose the end of the DOS stub as a function to make it easy to
; calculate its length.
end_dos_stub LABEL PROC
begin_dos_stub ENDP
END
| ; Copyright 2012 Google Inc.
;
; 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 or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
.386
.MODEL TINY, C
.CODE
PUBLIC end_dos_stub
begin_dos_stub PROC
; Fold the code and data segments, as our data is in this function.
; Note that begin_dos_stub is implicitly the start of the data segment.
push cs
pop ds
; Compute the distance to the string through this subtraction instead
; of e.g. a lea instruction to avoid the need for relocation entries
mov dx, message - begin_dos_stub
; Print the message to the console
mov ah, 09h
int 21h
; Terminate the program
mov ah, 00h
int 21h
message DB 'This is a Windows program, you cannot run it in DOS.\r\n$'
; Expose the end of the DOS stub as a function to make it easy to
; calculate its length.
end_dos_stub LABEL PROC
begin_dos_stub ENDP
END
| Switch dos stub processor spec to 386. | Switch dos stub processor spec to 386.
286 support is removed from the MASM that ships with VS2010.
BUG=
TEST=
Review URL: https://codereview.appspot.com/6223063
git-svn-id: db59699583a60be9a535cd09cdc9132301867226@834 15e8cca8-e42c-11de-a347-f34a4f72eb7d
| Assembly | apache-2.0 | sebmarchand/syzygy,ericmckean/syzygy,pombreda/syzygy,pombreda/syzygy,sebmarchand/syzygy,pombreda/syzygy,supriyantomaftuh/syzygy,wangming28/syzygy,sebmarchand/syzygy,ericmckean/syzygy,wangming28/syzygy,ericmckean/syzygy,pombreda/syzygy,supriyantomaftuh/syzygy,google/syzygy,ericmckean/syzygy,ericmckean/syzygy,supriyantomaftuh/syzygy,Eloston/syzygy,wangming28/syzygy,wangming28/syzygy,google/syzygy,google/syzygy,sebmarchand/syzygy,google/syzygy,supriyantomaftuh/syzygy,Eloston/syzygy,sebmarchand/syzygy,pombreda/syzygy |
d1e06fa9f0d59da5583a290dd88ab2c470a85dc2 | SATS/eeprom.sats | SATS/eeprom.sats | %{#
#include <avr/eeprom.h>
%}
fun eeprom_read_byte (address: int): uint8 = "mac#"
fun eeprom_write_byte (address: int, value: uint8): void = "mac#"
| %{#
#include <avr/eeprom.h>
%}
fun eeprom_read_byte {n:nat} (address: int n): uint8 = "mac#"
fun eeprom_write_byte {n:nat} (address: int n, value: uint8): void = "mac#"
| Add dependent types into EEPROM API | Add dependent types into EEPROM API
| ATS | mit | Proclivis/arduino-ats,Proclivis/arduino-ats,fpiot/arduino-ats,fpiot/arduino-ats |
44b76f434e557f631a1568f86798f00701720313 | demos/blink_ats/main.dats | demos/blink_ats/main.dats | implement main0 () = ()
| %{^
#include "LPC17xx.h"
%}
%{
volatile int g_LoopDummy;
void c_blink(void)
{
LPC_GPIO1->FIODIR |= 1 << 18; // P1.18 connected to LED1
while(1)
{
int i;
LPC_GPIO1->FIOPIN ^= 1 << 18; // Toggle P1.18
for (i = 0 ; i < 5000000 && !g_LoopDummy ; i++)
{
}
}
}
%}
extern fun c_blink (): void = "mac#"
implement main0 () = c_blink ()
| Include C raw source code | Include C raw source code
| ATS | apache-2.0 | fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats |
f55465fa5eebe0ee2fae412e8a72725ddb911039 | demos/halapi_ats/libmbedats/SATS/mbed_api_mbed_interface.sats | demos/halapi_ats/libmbedats/SATS/mbed_api_mbed_interface.sats | %{^
#include "mbed_interface.h"
%}
typedef char_p = cPtr0(char)
fun mbed_mac_address: (char_p) -> void = "mac#"
| Add type to mbed interface | Add type to mbed interface
| ATS | apache-2.0 | fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats,fpiot/mbed-ats | |
acb6181298f9a23c643c82a8d6f282e595ba91a1 | lenses/hostname.aug | lenses/hostname.aug | (*
Module: Hostname
Parses /etc/hostname and /etc/mailname
Author: Raphael Pinson <raphink@gmail.com>
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
*)
module Hostname =
autoload xfm
(* View: lns *)
let lns = [ label "hostname" . store Rx.word . Util.eol ]
(* View: filter *)
let filter = incl "/etc/hostname"
. incl "/etc/mailname"
let xfm = transform lns filter
| (*
Module: Hostname
Parses /etc/hostname and /etc/mailname
Author: Raphael Pinson <raphink@gmail.com>
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
*)
module Hostname =
autoload xfm
(* View: lns *)
let lns = [ label "hostname" . store Rx.word . Util.eol ] | Util.empty
(* View: filter *)
let filter = incl "/etc/hostname"
. incl "/etc/mailname"
let xfm = transform lns filter
| Allow Creation of Hostname When File is Missing | Allow Creation of Hostname When File is Missing
Within augtool, the current `hostname` lens does not allow you to create a hostname entry under the following circumstances:
* /etc/hostname file is empty
* /etc/hostname file does not exist
:: /etc/hostname file is empty
There is no augtool command(s) that will allow you to add a hostname entry to an existing, but empty, file. Example:
```
$ sudo rm /etc/hostname
$ sudo touch /etc/hostname
$ sudo augtool
augtool> set /files/etc/hostname/hostname myhostname
augtool> save
error: Failed to execute command
saving failed (run 'errors' for details)
augtool> errors
Error in /etc/hostname:1.0 (parse_skel_failed)
Input string does not match at all
Lens: /usr/share/augeas/lenses/dist/hostname.aug:16.10-.57:
```
Additionally, you cannot remove the empty file using augtool:
```
$ sudo rm /etc/hostname
$ sudo touch /etc/hostname
$ sudo augtool rm /files/etc/hostname
$ ls -l /etc/hostname
-rw-r--r-- 1 root root 0 Feb 19 12:39 /etc/hostname
```
:: /etc/hostname does not exist
Similar to the empty file case, you cannot create a hostname entry if the file does not already exist.
You can, however, create an empty file:
```
$ sudo rm /etc/hostname
# You can create an empty file with clear or touch
$ sudo augtool touch /files/etc/hostname
$ ls -l /etc/hostname
-rw-r--r-- 1 root root 0 Feb 19 12:34 /etc/hostname
```
Of course, now that you have an empty file, you cannot create a hostname entry for it :(
This proposed change will allow you to at least create a hostname entry when the file does not already exist.
It also enables you to remove file, allowing for a deterministic approach:
```
$ sudo rm /etc/hostname
$ sudo touch /etc/hostname
$ sudo augtool rm /files/etc/hostname
$ ls -l /etc/hostname
ls: cannot access '/etc/hostname': No such file or directory
$ sudo augtool set /files/etc/hostname/hostname myhostname
$ ls -l /etc/hostname
-rw-r--r-- 1 root root 11 Feb 19 12:44 /etc/hostname
$ cat /etc/hostname
myhostname
```
NOTE: Its probably very possible to fix the lens to deal more of the edge cases, but this quick fix at least gives deterministic behavior if a rm/set each time I want to configure the hostname.
Thank you for your consideration.
-David Farrell | Augeas | lgpl-2.1 | mlichvar/augeas,ptoscano/augeas,ptoscano/augeas,hercules-team/augeas,mlichvar/augeas,kunkku/augeas,kunkku/augeas,hercules-team/augeas,mlichvar/augeas,ptoscano/augeas,kunkku/augeas |
c55e6647654e0a8e5ca11d196f905227f7311b23 | spec/inittab.aug | spec/inittab.aug | # Parsing /etc/inittab
#map
# grammar inittab
# include '/etc/inittab' '/system/config/inittab'
#end
grammar inittab
token SEP ':'
token EOL '\n'
file: ( comment | record ) *
comment: ( /#.*?\n/ | /[ \t]*\n/ )
record: counter 'record' .
[ seq 'record' .
[ label 'id' . store ..? ] .
SEP .
[ label 'runlevels' . store ..? ] .
SEP .
[ label 'action' . store ..? ] .
SEP .
[ label 'process' . store ..? ] .
EOL
]
end
| # Parsing /etc/inittab
map
grammar inittab
include '/etc/inittab' '/system/config/inittab'
end
grammar inittab
token SEP ':'
token EOL '\n'
file: ( comment | record ) *
comment: ( /#.*?\n/ | /[ \t]*\n/ )
record: [ seq 'record' .
[ label 'id' . store ..? ] .
SEP .
[ label 'runlevels' . store ..? ] .
SEP .
[ label 'action' . store ..? ] .
SEP .
[ label 'process' . store ..? ] .
EOL
]
end
| Remove bogus reset of 'record' counter | Remove bogus reset of 'record' counter
| Augeas | lgpl-2.1 | hercules-team/augeas-do-not-use,hercules-team/augeas-do-not-use,manandbytes/augeas,raphink/augeas,dafugg/augeas,domcleal/augeas,GeoffWilliams/augeas,manandbytes/augeas,raphink/augeas,jtopjian/augeas,kunkku/augeas,MikaelSmith/augeas,hercules-team/augeas-do-not-use,bkearney/augeas,lutter/augeas,jtopjian/augeas,kumy/augeas,bkearney/augeas,domcleal/augeas,mchf/augeas,kumy/augeas,kunkku/augeas,camptocamp/augeas,mlichvar/augeas,camptocamp/augeas,jjlin/augeas,pevalme/augeas,bkearney/augeas,ptoscano/augeas,lutter/augeas,kunkku/augeas,jasperla/augeas,mlichvar/augeas,hercules-team/augeas,GeoffWilliams/augeas,jjlin/augeas,pevalme/augeas,domcleal/augeas,mlichvar/augeas,dafugg/augeas,camptocamp/augeas,kumy/augeas,MikaelSmith/augeas,camptocamp/augeas,jjlin/augeas,kumy/augeas,hercules-team/augeas,pevalme/augeas,ptoscano/augeas,lutter/augeas,dafugg/augeas,jasperla/augeas,bkearney/augeas,ptoscano/augeas,mchf/augeas |
5c2fa611519dd609b36123a36aca60ef00a03c79 | lenses/tests/test_puppetfileserver.aug | lenses/tests/test_puppetfileserver.aug | (* Tests for the PuppetFileserver module *)
module Test_puppetfileserver =
let fileserver = "# This a comment
[mount1]
# Mount1 options
path /etc/puppet/files/%h
allow host.domain1.com
allow *.domain2.com
deny badhost.domain2.com
[mount2]
allow *
deny *.evil.example.com
deny badhost.domain2.com
[mount3]
allow * # Puppet #6026: same line comment
# And trailing whitespace
allow *
"
test PuppetFileserver.lns get fileserver =
{ "#comment" = "This a comment" }
{ }
{ "mount1"
{ "#comment" = "Mount1 options" }
{ "path" = "/etc/puppet/files/%h" }
{ "allow" = "host.domain1.com" }
{ "allow" = "*.domain2.com" }
{ "deny" = "badhost.domain2.com" }
}
{ "mount2"
{ "allow" = "*" }
{ "deny" = "*.evil.example.com" }
{ "deny" = "badhost.domain2.com" }
}
{ "mount3"
{ "allow" = "*"
{ "#comment" = "Puppet #6026: same line comment" } }
{ "#comment" = "And trailing whitespace" }
{ "allow" = "*" }
}
| (* Tests for the PuppetFileserver module *)
module Test_puppetfileserver =
let fileserver = "# This a comment
[mount1]
# Mount1 options
path /etc/puppet/files/%h
allow host.domain1.com
allow *.domain2.com
deny badhost.domain2.com
[mount2]
allow *
deny *.evil.example.com
deny badhost.domain2.com
[mount3]
allow * # Puppet #6026: same line comment
# And trailing whitespace
allow *
"
test PuppetFileserver.lns get fileserver =
{ "#comment" = "This a comment" }
{ }
{ "mount1"
{ "#comment" = "Mount1 options" }
{ "path" = "/etc/puppet/files/%h" }
{ "allow" = "host.domain1.com" }
{ "allow" = "*.domain2.com" }
{ "deny" = "badhost.domain2.com" }
}
{ "mount2"
{ "allow" = "*" }
{ "deny" = "*.evil.example.com" }
{ "deny" = "badhost.domain2.com" }
}
{ "mount3"
{ "allow" = "*"
{ "#comment" = "Puppet #6026: same line comment" } }
{ "#comment" = "And trailing whitespace" }
{ "allow" = "*" }
}
| Remove trailing white spaces from puppet test | Remove trailing white spaces from puppet test
Trailing white lines are valid in a puppet file, but the test is rejected when
pushing to master git repository.
remote: lenses/tests/test_puppetfileserver.aug:20: trailing whitespace.
remote: +allow *
remote: error: hook declined to update refs/heads/master
! [remote rejected] master -> master (hook declined)
Removing white space for now.
| Augeas | lgpl-2.1 | ptoscano/augeas,lutter/augeas,jasperla/augeas,domcleal/augeas,kunkku/augeas,lutter/augeas,jjlin/augeas,dafugg/augeas,manandbytes/augeas,dafugg/augeas,hercules-team/augeas-do-not-use,hercules-team/augeas,pevalme/augeas,raphink/augeas,dafugg/augeas,jtopjian/augeas,jjlin/augeas,GeoffWilliams/augeas,MikaelSmith/augeas,ptoscano/augeas,pevalme/augeas,MikaelSmith/augeas,kumy/augeas,lutter/augeas,jasperla/augeas,kumy/augeas,kunkku/augeas,manandbytes/augeas,jjlin/augeas,mlichvar/augeas,kumy/augeas,mchf/augeas,mlichvar/augeas,kunkku/augeas,kumy/augeas,jtopjian/augeas,hercules-team/augeas-do-not-use,mchf/augeas,hercules-team/augeas-do-not-use,domcleal/augeas,pevalme/augeas,GeoffWilliams/augeas,mlichvar/augeas,hercules-team/augeas,ptoscano/augeas,domcleal/augeas,raphink/augeas |
dc80208efcc59c2fa3b207318e99da65b4ea61bb | lenses/tests/test_updatedb.aug | lenses/tests/test_updatedb.aug | (*
Module: Test_UpdateDB
Provides unit tests and examples for the <UpdateDB> lens.
*)
module Test_UpdateDB =
(* Test: UpdateDB.lns
Simple get test *)
test UpdateDB.lns get "# A comment
PRUNEPATHS=\"/tmp /var/spool /media /home/.ecryptfs\"
PRUNEFS=\"NFS nfs nfs4 rpc_pipefs\"
PRUNE_BIND_MOUNTS=\"yes\"\n" =
{ "#comment" = "A comment" }
{ "PRUNEPATHS"
{ "entry" = "/tmp" }
{ "entry" = "/var/spool" }
{ "entry" = "/media" }
{ "entry" = "/home/.ecryptfs" }
}
{ "PRUNEFS"
{ "entry" = "NFS" }
{ "entry" = "nfs" }
{ "entry" = "nfs4" }
{ "entry" = "rpc_pipefs" }
}
{ "PRUNE_BIND_MOUNTS" = "yes" }
(* Test: UpdateDB.lns
Adding to a list *)
test UpdateDB.lns put "PRUNEFS=\"NFS nfs nfs4 rpc_pipefs\"\n"
after set "/PRUNEFS/entry[last()+1]" "ecryptfs" =
"PRUNEFS=\"NFS nfs nfs4 rpc_pipefs ecryptfs\"\n"
| (*
Module: Test_UpdateDB
Provides unit tests and examples for the <UpdateDB> lens.
*)
module Test_UpdateDB =
(* Test: UpdateDB.lns
Simple get test *)
test UpdateDB.lns get "# A comment
PRUNEPATHS=\"/tmp /var/spool /media /home/.ecryptfs\"
PRUNEFS= \"NFS nfs nfs4 rpc_pipefs\"
PRUNE_BIND_MOUNTS = \"yes\"\n" =
{ "#comment" = "A comment" }
{ "PRUNEPATHS"
{ "entry" = "/tmp" }
{ "entry" = "/var/spool" }
{ "entry" = "/media" }
{ "entry" = "/home/.ecryptfs" }
}
{ "PRUNEFS"
{ "entry" = "NFS" }
{ "entry" = "nfs" }
{ "entry" = "nfs4" }
{ "entry" = "rpc_pipefs" }
}
{ "PRUNE_BIND_MOUNTS" = "yes" }
(* Test: UpdateDB.lns
Adding to a list *)
test UpdateDB.lns put "PRUNEFS=\"NFS nfs nfs4 rpc_pipefs\"\n"
after set "/PRUNEFS/entry[last()+1]" "ecryptfs" =
"PRUNEFS=\"NFS nfs nfs4 rpc_pipefs ecryptfs\"\n"
| Update tests to ensure spaces around = are OK | UpdateDB: Update tests to ensure spaces around = are OK
| Augeas | lgpl-2.1 | raphink/augeas,jjlin/augeas,ptoscano/augeas,jtopjian/augeas,mchf/augeas,kunkku/augeas,MikaelSmith/augeas,lutter/augeas,dafugg/augeas,mlichvar/augeas,kunkku/augeas,mlichvar/augeas,manandbytes/augeas,GeoffWilliams/augeas,pevalme/augeas,jasperla/augeas,ptoscano/augeas,jjlin/augeas,mlichvar/augeas,hercules-team/augeas,mchf/augeas,pevalme/augeas,dafugg/augeas,pevalme/augeas,MikaelSmith/augeas,manandbytes/augeas,lutter/augeas,GeoffWilliams/augeas,jjlin/augeas,jasperla/augeas,hercules-team/augeas,dafugg/augeas,jtopjian/augeas,lutter/augeas,kunkku/augeas,ptoscano/augeas,raphink/augeas |
d6defcdd21090434fdc2b52088834102217f7e1b | lenses/sep.aug | lenses/sep.aug | (*
Module: Sep
Generic separators to build lenses
Author: Raphael Pinson <raphink@gmail.com>
About: License
This file is licensed under the LGPLv2+, like the rest of Augeas.
*)
module Sep =
let colon = Util.del_str ":"
let comma = Util.del_str ","
let space = del Rx.space " "
let tab = del Rx.space "\t"
let opt_space = del Rx.opt_space ""
let opt_tab = del Rx.opt_space "\t"
| (*
Module: Sep
Generic separators to build lenses
Author: Raphael Pinson <raphink@gmail.com>
About: License
This file is licensed under the LGPLv2+, like the rest of Augeas.
*)
module Sep =
let colon = Util.del_str ":"
let comma = Util.del_str ","
let equal = Util.del_str "="
let space = del Rx.space " "
let tab = del Rx.space "\t"
let opt_space = del Rx.opt_space ""
let opt_tab = del Rx.opt_space "\t"
| Add Sep.equal, used in nrpe.aug | Add Sep.equal, used in nrpe.aug
| Augeas | lgpl-2.1 | hercules-team/augeas-do-not-use,mchf/augeas,lutter/augeas,dafugg/augeas,ptoscano/augeas,jjlin/augeas,dafugg/augeas,GeoffWilliams/augeas,hercules-team/augeas-do-not-use,jjlin/augeas,jasperla/augeas,GeoffWilliams/augeas,jtopjian/augeas,hercules-team/augeas,kumy/augeas,jtopjian/augeas,kumy/augeas,hercules-team/augeas,domcleal/augeas,MikaelSmith/augeas,kunkku/augeas,manandbytes/augeas,raphink/augeas,kunkku/augeas,lutter/augeas,dafugg/augeas,kunkku/augeas,mlichvar/augeas,domcleal/augeas,kumy/augeas,hercules-team/augeas-do-not-use,ptoscano/augeas,raphink/augeas,pevalme/augeas,jasperla/augeas,mchf/augeas,lutter/augeas,MikaelSmith/augeas,mlichvar/augeas,kumy/augeas,domcleal/augeas,pevalme/augeas,pevalme/augeas,manandbytes/augeas,mlichvar/augeas,jjlin/augeas,ptoscano/augeas |
b740b0a14d469f57b50a4a258c275a53ddbe3953 | tests/modules/fail_union_atype.aug | tests/modules/fail_union_atype.aug | module Fail_union_atype =
(* This is illegal, otherwise we don't know which alternative *)
(* to take for a tree { "a" = "?" } *)
let del_str (s:string) = del s s
let lns = [ key /a/ . store /b/ . del_str " (l)"
| [ key /a/ . store /c/ . del_str " (r)" ]
(* To make this a passing test, make sure that this also works: *)
(* test lns put "ac (r)" after set "a" "b" = "ab (l)" *)
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| module Fail_union_atype =
(* This is illegal, otherwise we don't know which alternative *)
(* to take for a tree { "a" = "?" } *)
let del_str (s:string) = del s s
let lns = [ key /a/ . store /b/ . del_str " (l)" ]
| [ key /a/ . store /c/ . del_str " (r)" ]
(* To make this a passing test, make sure that this also works: *)
(* test lns put "ac (r)" after set "a" "b" = "ab (l)" *)
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| Fix syntax error in test | Fix syntax error in test
| Augeas | lgpl-2.1 | jasperla/augeas,GeoffWilliams/augeas,kumy/augeas,MikaelSmith/augeas,kunkku/augeas,jjlin/augeas,mchf/augeas,MikaelSmith/augeas,domcleal/augeas,ptoscano/augeas,pevalme/augeas,camptocamp/augeas,manandbytes/augeas,camptocamp/augeas,kumy/augeas,ptoscano/augeas,raphink/augeas,bkearney/augeas,lutter/augeas,hercules-team/augeas-do-not-use,camptocamp/augeas,kunkku/augeas,ptoscano/augeas,bkearney/augeas,jtopjian/augeas,lutter/augeas,jasperla/augeas,camptocamp/augeas,pevalme/augeas,jtopjian/augeas,dafugg/augeas,GeoffWilliams/augeas,mlichvar/augeas,pevalme/augeas,domcleal/augeas,raphink/augeas,hercules-team/augeas-do-not-use,domcleal/augeas,manandbytes/augeas,bkearney/augeas,jjlin/augeas,kumy/augeas,jjlin/augeas,hercules-team/augeas,mlichvar/augeas,mchf/augeas,dafugg/augeas,hercules-team/augeas,lutter/augeas,bkearney/augeas,mlichvar/augeas,hercules-team/augeas-do-not-use,kumy/augeas,dafugg/augeas,kunkku/augeas |
b6943ab317767f21f820459d75bbb0ebc7c20ebd | tests/modules/pass_subtree_growth.aug | tests/modules/pass_subtree_growth.aug | module Pass_subtree_growth =
(* Make sure that a subtree that is not the lowest one does indeed *)
(* grow the tree, instead of just setting the label of an enclosed *)
(* subtree. This is only a problem if the enclosed subtree does *)
(* not have a label *)
let lns = [ label "outer" . [ store /a/ ] ]
(* The improper result is { "outer" = "a" } *)
test lns get "a" = { "outer" { = "a" } }
test lns put "a" after set "outer" "b" = "b"
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| module Pass_subtree_growth =
(* Make sure that a subtree that is not the lowest one does indeed *)
(* grow the tree, instead of just setting the label of an enclosed *)
(* subtree. This is only a problem if the enclosed subtree does *)
(* not have a label *)
let lns = [ label "outer" . [ store /a/ ] ]
(* The improper result is { "outer" = "a" } *)
test lns get "a" = { "outer" { = "a" } }
(* This produces a tree { "outer" = "b" { = "a" } } *)
(* but the value for "outer" is never used in put *)
(* (That should probably be flagged as an error separately) *)
test lns put "a" after set "outer" "b" = "a"
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| Fix put test - it was checking for hte wrong result | Fix put test - it was checking for hte wrong result
| Augeas | lgpl-2.1 | pevalme/augeas,dafugg/augeas,GeoffWilliams/augeas,jjlin/augeas,mchf/augeas,jtopjian/augeas,dafugg/augeas,mlichvar/augeas,kunkku/augeas,ptoscano/augeas,camptocamp/augeas,jasperla/augeas,MikaelSmith/augeas,lutter/augeas,bkearney/augeas,hercules-team/augeas-do-not-use,dafugg/augeas,kumy/augeas,hercules-team/augeas-do-not-use,kunkku/augeas,camptocamp/augeas,ptoscano/augeas,mlichvar/augeas,domcleal/augeas,hercules-team/augeas-do-not-use,camptocamp/augeas,manandbytes/augeas,jasperla/augeas,mchf/augeas,ptoscano/augeas,bkearney/augeas,kumy/augeas,kumy/augeas,lutter/augeas,bkearney/augeas,manandbytes/augeas,pevalme/augeas,hercules-team/augeas,bkearney/augeas,jjlin/augeas,raphink/augeas,kunkku/augeas,domcleal/augeas,domcleal/augeas,MikaelSmith/augeas,mlichvar/augeas,pevalme/augeas,kumy/augeas,jtopjian/augeas,jjlin/augeas,raphink/augeas,GeoffWilliams/augeas,lutter/augeas,camptocamp/augeas,hercules-team/augeas |
7e5905455be25dc9fe59f18bca843fc2e3dee324 | modules/nagios/lib/augeas/lenses/nagioscfg.aug | modules/nagios/lib/augeas/lenses/nagioscfg.aug | (*
Module: NagiosConfig
Parses /etc/{nagios{3,},icinga/*.cfg
Authors: Sebastien Aperghis-Tramoni <sebastien@aperghis.net>
Raphaël Pinson <raphink@gmail.com>
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
About: Lens Usage
To be documented
About: Configuration files
This lens applies to /etc/{nagios{3,},icinga/*.cfg. See <filter>.
*)
module NagiosCfg =
autoload xfm
(************************************************************************
* Group: Utility variables/functions
************************************************************************)
(* View: param_def
define a field *)
let param_def =
let space_in = /[^ \t\n][^\n=]*[^ \t\n]|[^ \t\n]/
in key /[A-Za-z0-9_]+/
. Sep.space_equal
. store space_in
(* View: macro_def
Macro line, as used in resource.cfg *)
let macro_def =
let macro = /\$[A-Za-z0-9]+\$/
in let macro_decl = Rx.word | Rx.fspath
in key macro . Sep.space_equal . store macro_decl
(************************************************************************
* Group: Entries
************************************************************************)
(* View: param
Params can have sub params *)
let param =
[ Util.indent . param_def
. [ Sep.space . param_def ]*
. Util.eol ]
(* View: macro *)
let macro = [ Util.indent . macro_def . Util.eol ]
(************************************************************************
* Group: Lens
************************************************************************)
(* View: entry
Define the accepted entries, such as param for regular configuration
files, and macro for resources.cfg .*)
let entry = param
| macro
(* View: lns
main structure *)
let lns = ( Util.empty | Util.comment | entry )*
(* View: filter *)
let filter = incl "/etc/nagios3/*.cfg"
. incl "/etc/nagios/*.cfg"
. incl "/etc/icinga/*.cfg"
. excl "/etc/nagios3/commands.cfg"
. excl "/etc/nagios/commands.cfg"
. excl "/etc/nagios/nrpe.cfg"
. incl "/etc/icinga/commands.cfg"
let xfm = transform lns filter
| Add more recent nagios lens | Add more recent nagios lens
| Augeas | apache-2.0 | ScottWales/base-vm,ScottWales/dataportal | |
4a144018fd2ec1fd9bef670e1081a4deb88bb90f | lenses/tests/test_radicale.aug | lenses/tests/test_radicale.aug | module Test_radicale =
let conf = "
[server]
[encoding]
[well-known]
[auth]
[git]
[rights]
[storage]
[logging]
[headers]
"
test Radicale.lns get conf =
{}
{ "server"
{} }
{ "encoding"
{} }
{ "well-known"
{} }
{ "auth"
{} }
{ "git"
{} }
{ "rights"
{} }
{ "storage"
{} }
{ "logging"
{} }
{ "headers"
{} }
test Radicale.lns put conf after
set "server/hosts" "127.0.0.1:5232, [::1]:5232";
set "server/base_prefix" "/radicale/";
set "well-known/caldav" "/radicale/%(user)s/caldav/";
set "well-known/cardav" "/radicale/%(user)s/carddav/";
set "auth/type" "remote_user";
set "rights/type" "owner_only"
= "
[server]
hosts=127.0.0.1:5232, [::1]:5232
base_prefix=/radicale/
[encoding]
[well-known]
caldav=/radicale/%(user)s/caldav/
cardav=/radicale/%(user)s/carddav/
[auth]
type=remote_user
[git]
[rights]
type=owner_only
[storage]
[logging]
[headers]
"
| Add test for radicale lens | Add test for radicale lens
| Augeas | lgpl-2.1 | kunkku/augeas,ptoscano/augeas,lutter/augeas,kunkku/augeas,hercules-team/augeas,pevalme/augeas,hercules-team/augeas,mlichvar/augeas,mlichvar/augeas,ptoscano/augeas,ptoscano/augeas,kunkku/augeas,pevalme/augeas,manandbytes/augeas,mlichvar/augeas,lutter/augeas,mchf/augeas,manandbytes/augeas,lutter/augeas,pevalme/augeas,mchf/augeas | |
bcd545bc8388de5111b49eda2c40202e8238bac0 | files/lenses/epsg.aug | files/lenses/epsg.aug | module EPSG =
let proj = [ key /[^\/= \t\n]+/ . (Sep.equal . store Rx.no_spaces)? ]
let entry = [ Util.del_str "<" . key Rx.integer . Util.del_str ">"
. Sep.space . Build.opt_list proj Sep.space . Sep.space
. Util.del_str "<>" . Util.eol ]
let lns = (Util.empty | Util.comment | entry)*
| Add basic EPSG augeas lens | Add basic EPSG augeas lens
| Augeas | apache-2.0 | camptocamp/puppet-proj | |
c3bd786d9a17bcdb2334740eca06abf1345762cf | lenses/fstab.aug | lenses/fstab.aug | (* Parsing /etc/fstab *)
module Fstab =
autoload xfm
let sep_tab = Sep.tab
let sep_spc = Sep.space
let comma = Sep.comma
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let word = Rx.neg1
let spec = /[^,# \n\t][^ \n\t]*/
let comma_sep_list (l:string) =
let lns = [ label l . store word ] in
Build.opt_list lns comma
let record = [ seq "mntent" .
[ label "spec" . store spec ] . sep_tab .
[ label "file" . store word ] . sep_tab .
comma_sep_list "vfstype" . sep_tab .
comma_sep_list "opt" .
(sep_tab . [ label "dump" . store /[0-9]+/ ] .
( sep_spc . [ label "passno" . store /[0-9]+/ ])? )?
. eol ]
let lns = ( empty | comment | record ) *
let xfm = transform lns (incl "/etc/fstab")
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| (* Parsing /etc/fstab *)
module Fstab =
autoload xfm
let sep_tab = Sep.tab
let sep_spc = Sep.space
let comma = Sep.comma
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let word = Rx.neg1
let spec = /[^,# \n\t][^ \n\t]*/
let comma_sep_list (l:string) =
let lns = [ label l . store word ] in
Build.opt_list lns comma
let record = [ seq "mntent" .
[ label "spec" . store spec ] . sep_tab .
[ label "file" . store word ] . sep_tab .
comma_sep_list "vfstype" . sep_tab .
comma_sep_list "opt" .
(sep_tab . [ label "dump" . store /[0-9]+/ ] .
( sep_spc . [ label "passno" . store /[0-9]+/ ])? )?
. eol ]
let lns = ( empty | comment | record ) *
let filter = (incl "/etc/fstab")
. (incl "/etc/mtab")
let xfm = transform lns filter
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| Add /etc/mtab to known files | Add /etc/mtab to known files
| Augeas | lgpl-2.1 | jjlin/augeas,lutter/augeas,hercules-team/augeas-do-not-use,dafugg/augeas,jjlin/augeas,manandbytes/augeas,dafugg/augeas,MikaelSmith/augeas,jjlin/augeas,mchf/augeas,jtopjian/augeas,lutter/augeas,raphink/augeas,domcleal/augeas,hercules-team/augeas,dafugg/augeas,hercules-team/augeas-do-not-use,ptoscano/augeas,domcleal/augeas,jtopjian/augeas,hercules-team/augeas,hercules-team/augeas-do-not-use,kumy/augeas,kunkku/augeas,MikaelSmith/augeas,ptoscano/augeas,jasperla/augeas,kunkku/augeas,mlichvar/augeas,domcleal/augeas,pevalme/augeas,pevalme/augeas,kumy/augeas,GeoffWilliams/augeas,ptoscano/augeas,manandbytes/augeas,lutter/augeas,mlichvar/augeas,mchf/augeas,GeoffWilliams/augeas,kumy/augeas,kumy/augeas,pevalme/augeas,jasperla/augeas,mlichvar/augeas,raphink/augeas,kunkku/augeas |
417e094dd53932acfc6465238f96afb4d914cd24 | spec/pam.aug | spec/pam.aug | # Parsing /etc/inittab
map
grammar pam
# We really need to be able to exclude some files, like
# backup files and .rpmsave files
include '/etc/pam.d/*' '/system/config/pam' $basename
end
grammar pam
token SEP /[ \t]+/ = '\t'
token EOL '\n'
token CONTROL /(\[[^\]]*\]|[^ \t]+)/ = 'none'
token POUND_TO_EOL /#.*\n/ = '# '
file: ( comment | record ) *
comment: ( /#.*?\n/ | /[ \t]*\n/ )
record: [ seq 'record' .
[ label 'type' . store ... ] .
SEP .
[ label 'control' . store CONTROL] .
SEP .
[ label 'module' . store ... ] .
( [ SEP . label 'opts' . store ... ] )? .
EOL
]
end
| # Parsing /etc/inittab
map
grammar pam
# We really need to be able to exclude some files, like
# backup files and .rpmsave files
include '/etc/pam.d/*' '/system/config/pam' $basename
end
grammar pam
token SEP /[ \t]+/ = '\t'
token EOL '\n'
token CONTROL /(\[[^\]]*\]|[^ \t]+)/ = 'none'
token POUND_TO_EOL /#.*\n/ = '# '
file: ( comment | record ) *
comment: [ ( /#.*?\n/ | /[ \t]*\n/ ) ]
record: [ seq 'record' .
[ label 'type' . store ... ] .
SEP .
[ label 'control' . store CONTROL] .
SEP .
[ label 'module' . store ... ] .
( [ SEP . label 'opts' . store ... ] )? .
EOL
]
end
| Store comments in subtrees so they are restored properly | Store comments in subtrees so they are restored properly
| Augeas | lgpl-2.1 | kumy/augeas,dafugg/augeas,MikaelSmith/augeas,hercules-team/augeas-do-not-use,jjlin/augeas,pevalme/augeas,mchf/augeas,jtopjian/augeas,lutter/augeas,domcleal/augeas,hercules-team/augeas,ptoscano/augeas,dafugg/augeas,bkearney/augeas,raphink/augeas,ptoscano/augeas,GeoffWilliams/augeas,mlichvar/augeas,ptoscano/augeas,camptocamp/augeas,kumy/augeas,GeoffWilliams/augeas,kumy/augeas,camptocamp/augeas,kunkku/augeas,camptocamp/augeas,kunkku/augeas,jasperla/augeas,bkearney/augeas,kumy/augeas,lutter/augeas,bkearney/augeas,camptocamp/augeas,jjlin/augeas,kunkku/augeas,hercules-team/augeas-do-not-use,pevalme/augeas,mlichvar/augeas,domcleal/augeas,pevalme/augeas,lutter/augeas,hercules-team/augeas,MikaelSmith/augeas,mchf/augeas,hercules-team/augeas-do-not-use,bkearney/augeas,mlichvar/augeas,jasperla/augeas,manandbytes/augeas,jtopjian/augeas,domcleal/augeas,manandbytes/augeas,dafugg/augeas,raphink/augeas,jjlin/augeas |
a953a294b231367d276f365842682a32d6b14e61 | tests/modules/pass_let_exp.aug | tests/modules/pass_let_exp.aug | (* Test let expressions *)
module Pass_let_exp =
(* This definition is insanely roundabout; it's written that way *)
(* since we want to exercise LET expressions *)
let lns =
let lbl = "a" in
let spc = " " in
let del_spaces (s:string) = del spc+ s in
let del_str (s:string) = del s s in
let store_delim (ldelim:string)
(rdelim:string) (val:regexp) =
del_str ldelim . store val . del_str rdelim in
[ label lbl . del_spaces " " . store_delim "(" ")" /[a-z]+/ ]
test lns get " (abc)" = { "a" = "abc" }
(* Local Variables: *)
(* mode: caml *)
(* End: *)
| Check that let expressions work | Check that let expressions work
| Augeas | lgpl-2.1 | mchf/augeas,jjlin/augeas,mchf/augeas,bkearney/augeas,hercules-team/augeas,hercules-team/augeas-do-not-use,raphink/augeas,GeoffWilliams/augeas,domcleal/augeas,kumy/augeas,mlichvar/augeas,kunkku/augeas,jjlin/augeas,ptoscano/augeas,MikaelSmith/augeas,jjlin/augeas,mlichvar/augeas,lutter/augeas,MikaelSmith/augeas,hercules-team/augeas,camptocamp/augeas,jtopjian/augeas,hercules-team/augeas-do-not-use,domcleal/augeas,camptocamp/augeas,bkearney/augeas,raphink/augeas,GeoffWilliams/augeas,lutter/augeas,kunkku/augeas,jasperla/augeas,kunkku/augeas,dafugg/augeas,camptocamp/augeas,jasperla/augeas,ptoscano/augeas,bkearney/augeas,manandbytes/augeas,kumy/augeas,lutter/augeas,kumy/augeas,pevalme/augeas,dafugg/augeas,mlichvar/augeas,bkearney/augeas,ptoscano/augeas,kumy/augeas,camptocamp/augeas,dafugg/augeas,pevalme/augeas,hercules-team/augeas-do-not-use,manandbytes/augeas,domcleal/augeas,pevalme/augeas,jtopjian/augeas | |
ce90a9959965de8ecf3935090d0f16b18716a216 | autohotkey/shortcuts_compilation.ahk | autohotkey/shortcuts_compilation.ahk | #NoTrayIcon
#Persistent
#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;;*******************************************************
; CUSTOM SHORTCUTS
;*******************************************************
;-------------------------------------------------------
; Keep window on top
;-------------------------------------------------------
!+^T:: Winset, Alwaysontop, , A
;-------------------------------------------------------
;-------------------------------------------------------
; Replace default calculator
;-------------------------------------------------------
^NumpadEnter::Run "C:\Program Files (x86)\Moffsoft FreeCalc\MoffFreeCalc.exe"
;-------------------------------------------------------
;-------------------------------------------------------
; Call Listary
;-------------------------------------------------------
; With Alt + Space
!Space::Send !+^{=}
; With the down button of the mouse
XButton1::Send !+^{)}
;-------------------------------------------------------
;-------------------------------------------------------
; Switch between the desktops
;-------------------------------------------------------
; With the up button of the mouse
^XButton1:: switchDesktop() ;
XButton2:: switchDesktop() ;
; Function to switch between the desktops
switchedDesktop := false
switchDesktop()
{
global switchedDesktop
if switchedDesktop
{
SendEvent ^#{Right}
switchedDesktop := false
}
else
{
SendEvent ^#{Left}
switchedDesktop := true
}
}
;------------------------------------------------------- | #NoTrayIcon
#Persistent
#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;;*******************************************************
; CUSTOM SHORTCUTS
;*******************************************************
;-------------------------------------------------------
; Keep window on top
;-------------------------------------------------------
!+^T:: Winset, Alwaysontop, , A
;-------------------------------------------------------
;-------------------------------------------------------
; Replace default calculator
;-------------------------------------------------------
^NumpadEnter::Run "C:\Program Files (x86)\Moffsoft FreeCalc\MoffFreeCalc.exe"
;-------------------------------------------------------
;-------------------------------------------------------
; Call Listary
;-------------------------------------------------------
; With Alt + Space
!Space::Send !+^{=}
; With the down button of the mouse
XButton1::Send !+^{)}
^RButton::Send !+^{)}
;-------------------------------------------------------
;-------------------------------------------------------
; Switch between the desktops
;-------------------------------------------------------
; With the up button of the mouse
^XButton1:: switchDesktop() ;
XButton2:: switchDesktop() ;
; Function to switch between the desktops
switchedDesktop := false
switchDesktop()
{
global switchedDesktop
if switchedDesktop
{
SendEvent ^#{Right}
switchedDesktop := false
}
else
{
SendEvent ^#{Left}
switchedDesktop := true
}
}
;------------------------------------------------------- | Add another shortcut for Listary | Add another shortcut for Listary
| AutoHotkey | mit | teddy-gustiaux/scripts,teddy-gustiaux/scripts |
0f447ba1140fb2991bdd1a4de8a6d135d9f4dcc5 | main.ahk | main.ahk | email = %1%
passwrd = %2%
Checkd()
{
WinWait Blizzard App Login, ,3
WinMove 0, 0
WinActivate
IfWinNotActive
{
Checkd()
}
if ErrorLevel
{
MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp
exit
}
}
Checkd()
Sleep 2000
Checkd()
WinActivate
Checkd()
ClickFromTopRight(42,200)
Send ^a
Send {BS}
send %email%
sleep 20
Sleep 100
ClickFromTopRight(42,250)
Sleep 20
ClickFromTopRight(42,250)
Send ^a
Send {BS}
send %passwrd%
Send {Enter}
exit
ClickFromTopRight(_X,_Y){
CoordMode, mouse, Relative
WinGetActiveStats, Title, width, height, x,y
_X := width - _X
Click %_X%, %_Y%
}
| email = %1%
passwrd = %2%
Checkd()
{
WinWait Blizzard Battle.net Login, ,3
WinMove 0, 0
WinActivate
IfWinNotActive
{
Checkd()
}
if ErrorLevel
{
MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp
exit
}
}
Checkd()
Sleep 2000
Checkd()
WinActivate
Checkd()
ClickFromTopRight(42,200)
Send ^a
Send {BS}
send %email%
sleep 20
Sleep 100
ClickFromTopRight(42,250)
Sleep 20
ClickFromTopRight(42,250)
Send ^a
Send {BS}
send %passwrd%
Send {Enter}
exit
ClickFromTopRight(_X,_Y){
CoordMode, mouse, Relative
WinGetActiveStats, Title, width, height, x,y
_X := width - _X
Click %_X%, %_Y%
}
| Update for new bnet title scheme | Update for new bnet title scheme | AutoHotkey | mit | judge2020/Battle.net-Switcher |
1fba5bc9c7987bab764c59df54707aac76f03e76 | AutoHotkeyScript.ahk | AutoHotkeyScript.ahk | ; ahk_class PotPlayer
#SC01F::Send {Media_Play_Pause}
$+1::Send {!}
$+2::Send {@}
$+3::Send {#}
$+4::Send {$}
$+5::Send {`%}
$+6::Send {^}
;$+7::Send {&}
$+8::Send {*}
| #InstallKeybdHook
#SingleInstance Force
; ahk_class PotPlayer
#SC01F::Send {Media_Play_Pause}
$+1::Send {!}
$+2::Send {@}
$+3::Send {#}
$+4::Send {$}
$+5::Send {`%}
$+6::Send {^}
;$+7::Send {&}
$+8::Send {*}
GetKeyboardLayout()
{
HKL := DllCall("GetKeyboardLayout", "UInt", 0, "Ptr")
Return HKL
}
GetKeyboardLayoutName()
{
VarSetCapacity(Str, 1000)
DllCall("GetKeyboardLayoutName", "Str", Str, "Int")
Return Str
}
ActivateKeyboardLayout(HKL) ; This does not work.
{
; For initialization, necessary to run only once.
DllCall("Ole32.dll\OleInitialize", "Ptr", 0, "Int")
DllCall("LoadKeyboardLayout", "Str", "00020409", "Int")
T := DllCall("ActivateKeyboardLayout", "UInt", HKL, "UInt", 0x00000000, "PTR")
If (!T)
{
MsgBox, Error
}
}
Capslock::
SetCapsLockState, Off
If (Lang = 0)
{
PostMessage, 0x50, 0, 0xF0020409,, A
Lang := 1
}
Else
{
PostMessage, 0x50, 0, 0xF03A0429,, A
Lang := 0
}
Return
<^Capslock::
SetCapsLockState, Off
PostMessage, 0x50, 0, 0xF01A0409,, A
Return
>^Capslock::
SetCapsLockState, Off
PostMessage, 0x50, 0, 0xF01B0409,, A
Return
!Capslock::
T := GetKeyboardLayout()
H := Format("{1:X}", T)
MsgBox, %T% %H%
Return
Temp()
{
;^1:: ; This line is commented out.
T := GetKeyboardLayout()
H := Format("{1:X}", T)
MsgBox, %T% %H%
Return
;^2:: ; This line is commented out.
;ActivateKeyboardLayout(0xF0020409)
PostMessage, 0x50, 0, 0xF0020409,, A
MsgBox, Done.
Return
}
| Add hotkeys for changing keyboard language. | Add hotkeys for changing keyboard language.
| AutoHotkey | mit | Shayan-To/AutoHotkeyScripts |
610930bc76facbcd851bc50ffff05e39a3b91646 | AutoHotkeyScript.ahk | AutoHotkeyScript.ahk | ; ahk_class PotPlayer
#SC01F::Send {Media_Play_Pause} | ; ahk_class PotPlayer
#SC01F::Send {Media_Play_Pause}
$+1::Send {!}
$+2::Send {@}
$+3::Send {#}
$+4::Send {$}
$+5::Send {`%}
$+6::Send {^}
;$+7::Send {&}
$+8::Send {*}
| Add special characters for Persian keyboard. | Add special characters for Persian keyboard.
| AutoHotkey | mit | Shayan-To/AutoHotkeyScripts |
cc4e9cb7ab374fd7462f291930e33c412ee6652c | autohotkey.ahk | autohotkey.ahk | FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"
; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö ; does not work
; HHKB settings to mimic macOS behavior on Windows
; Lwin = <^
LWin::LCtrl
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<^Tab::Send {LWin down}{Tab}{LWin up} | FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"
; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö ; does not work
; HHKB settings to mimic macOS behavior on Windows
LWin::LCtrl ; this one is better to use SharpKeys for, as it is unreliable here
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<+^Up:: Send, {LShift down}{PgUp}{LShift up}
<+^Down:: Send, {LShift down}{PgDn}{LShift up}
<^Tab::Send {LWin down}{Tab}{LWin up} | Add reliable setup in conjunction with SharpKeys | Add reliable setup in conjunction with SharpKeys
| AutoHotkey | mit | fredrikaverpil/dotfiles,fredrikaverpil/dotfiles,fredrikaverpil/dotfiles |
6a67773a950a9b9e2cfe9215f470bef903173864 | autohotkey.ahk | autohotkey.ahk | FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"
; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö
; HHKB settings to mimic macOS behavior on Windows
LWin::LCtrl ; this one is better to use SharpKeys for, as it is unreliable here
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<+^Right:: Send, {LShift down}{End}{LShift up}
<+^Left:: Send, {LShift down}{Home}{LShift up}
<+^Up:: Send, {LShift down}{PgUp}{LShift up}
<+^Down:: Send, {LShift down}{PgDn}{LShift up}
; Windows laptop
AppsKey:: Send, {RWin}
| ; Put this file in
; %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
FileEncoding, UTF-8 ; This file needs to be saved/encoded with "UTF-8 with BOM"
; Use Swedish characters on US-English keyboard
![:: Send, å
!+{:: Send, Å
!':: Send, ä
!+':: Send, Ä
!;:: Send, ö
!+;:: Send, Ö
; HHKB settings to mimic macOS behavior on Windows
LWin::LCtrl ; this one is better to use SharpKeys for, as it is unreliable here
<^Right:: Send, {End}
<^Left:: Send, {Home}
<^Up:: Send, {PgUp}
<^Down:: Send, {PgDn}
<+^Right:: Send, {LShift down}{End}{LShift up}
<+^Left:: Send, {LShift down}{Home}{LShift up}
<+^Up:: Send, {LShift down}{PgUp}{LShift up}
<+^Down:: Send, {LShift down}{PgDn}{LShift up}
; Windows laptop
AppsKey:: Send, {RWin}
| Add path onto which to store this file | Add path onto which to store this file
| AutoHotkey | mit | fredrikaverpil/dotfiles,fredrikaverpil/dotfiles,fredrikaverpil/dotfiles |
849883612dd7aa9c5373b1b067a369ed6c729dc9 | HpEliteBook820.ahk | HpEliteBook820.ahk | #Include, %A_ScriptDir%
#InstallKeybdHook
#SingleInstance, Force
Capslock & ScrollLock:: Send, {ScrollLock}
Capslock & Pause:: Send, {Pause}
ScrollLock::Home
Pause::End
Insert & Backspace::Send, {AppsKey}
| Add some device specific keyboard modifications. | Add some device specific keyboard modifications.
| AutoHotkey | mit | Shayan-To/AutoHotkeyScripts | |
4584f12f6e9aed5207d9ea0bd5bca00bda41ea2f | conf/autohotkey/duplicate-window-width.ahk | conf/autohotkey/duplicate-window-width.ahk | +#Up::
WinGetActiveTitle, Title
WinRestore, %Title%
SysGet, X1, 76
SysGet, Y1, 77
SysGet, Width, 78
SysGet, Height, 79
WinMove, %Title%,, X1, Y1, Width, Height
return
| Add ahk-script to duplicate window width (useful with vertical monitors) | WIP: Add ahk-script to duplicate window width (useful with vertical monitors)
| AutoHotkey | mit | monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.