doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
b17eb8df-5da1-460a-a9ee-c10f453fc0a9
{ "language": "Assembly" }
```assembly .386 .model flat exception_handler proto .safeseh exception_handler end ``` Fix Windows compileation for VS 2010
```assembly .386 .model flat exception_handler proto c .safeseh exception_handler end ```
99ac7f94-12f1-41b4-a795-7ad8188fde64
{ "language": "Assembly" }
```assembly ; 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...
```assembly ; 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...
9f997adc-2e26-42e7-83b6-304d6b146534
{ "language": "Assembly" }
```assembly \ 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...
```assembly \ 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...
a5d68675-ec5c-4e9c-8249-f357344820ce
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 Licen...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 Licen...
ec4ce890-7e68-4c4e-a6d4-ba885868eb5d
{ "language": "Assembly" }
```assembly # 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 ...
```assembly # 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 ...
44e037d6-fbba-4ea5-a8aa-5d76903d5de8
{ "language": "Assembly" }
```assembly 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:...
```assembly 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:...
d2dc8d5c-fd97-44b7-8438-20c1ef7344bd
{ "language": "Assembly" }
```assembly ``` Add patch to keep DoS drawbridge down once lowered
```assembly .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 .o...
f43e5ee7-9af7-406d-8cee-49e5670a4357
{ "language": "Assembly" }
```assembly ``` Add completely untested multitasking code
```assembly 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 ...
2beaee4a-a817-4a8f-8d52-bfd8000fdc4b
{ "language": "Assembly" }
```assembly 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 ...
```assembly 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 dwor...
c8c44296-fee0-4a1c-b08a-01d1c17645e8
{ "language": "Assembly" }
```assembly BasicUpstart2(start) * = $0810 "Main" start: rts ``` Add optimistic disk loading code to get the map into 000
```assembly 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 sk...
bfad09ce-0c63-4085-868d-59bf71f98a6b
{ "language": "Assembly" }
```assembly %include "Ab/State.nasm" extern ab_act global ab_interpret_func section .text ab_interpret_func: call ab_act ret ``` Check the state->st_b.condition when returining from the interpreter
```assembly %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: ...
0ab59c9d-0090-4a33-8dc5-45b686d132ee
{ "language": "Assembly" }
```assembly ``` Add test for fsave and frstor
```assembly global _start section .data align 16 %include "header.inc" sub esp, 128 fldz fld1 fsave [esp] frstor [esp] %include "footer.inc" ```
ccef8999-216d-4e00-80ae-e5e806b95fd2
{ "language": "Assembly" }
```assembly ``` Add proof of concept file for using assembler macros instead of instructions.
```assembly .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 ...
479f35d8-c1dc-49e2-85d7-b723d51cf0e0
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 Licen...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 Licen...
5511e28f-29ec-4d44-a742-79d9abf439b6
{ "language": "Assembly" }
```assembly .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 ...
```assembly .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 ...
c94c3ba9-4580-48c4-ae65-71578540d24a
{ "language": "Assembly" }
```assembly // 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)``` Print additional info about SID ...
```assembly // 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) //--------------------------...
069b52d6-8457-48c4-9445-f7efda75d637
{ "language": "Assembly" }
```assembly .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 ``` Fix bu...
```assembly .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...
d39c379c-0dcb-4b33-915c-537b81d452f7
{ "language": "Assembly" }
```assembly org $0fff load_address: $01 $10 @(low basic_end) @(high basic_end) $01 $00 $9e "4109" 0 basic_end: $00 $00 ``` Make SYS call to label main, not the end of the BASIC program.
```assembly org $0fff load_address: $01 $10 @(low basic_end) @(high basic_end) $01 $00 $9e @(princ main nil) 0 basic_end: $00 $00 ```
3c07967c-1a25-4f8f-9c99-95cb43bd7617
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
d2a15b4b-78aa-45ac-b568-26313157ea90
{ "language": "Assembly" }
```assembly ``` Add Linux "hello world" example
```assembly ; ; 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 ...
ad86cbf8-28c0-4fda-b4d8-2e8f482dcafc
{ "language": "Assembly" }
```assembly ``` Add patch to make gergoth not be on top of player coming from left
```assembly .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 wa...
792c2eb3-e8a0-4fc2-a728-c90c6c4a6d0d
{ "language": "Assembly" }
```assembly ``` Add patch to start Julius with the Tower Key
```assembly .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 c...
8138dbb8-ab14-40e6-bfb5-37ae0f5a28ca
{ "language": "Assembly" }
```assembly [ORG 0x10800] PMode: mov eax, 0xFEEDFACE mov ecx, 0xF00DD00D mov edx, 0xBAADBEEF .jmpy: hlt jmp .jmpy``` Change setup for protected mode
```assembly [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 ```
3e1688e5-08f6-4c78-b15c-8c38f0fbd36a
{ "language": "Assembly" }
```assembly ``` Add asm patch to break balore blocks with any weapon
```assembly .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...
c41bf68d-6c07-46e2-8a01-cc4648316b0e
{ "language": "Assembly" }
```assembly ``` Add in example that was provided to create a basic "kernel" for the atari game for rendering to the screen.
```assembly 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 WSYN...
6142cbdd-ee0b-4930-8a9e-74bd63e99231
{ "language": "Assembly" }
```assembly //============================================================ // .efo header //============================================================ .pc = $0 .text "EFO2" // fileformat magic .word prepare // prepare routine .word setup // setup routine .word interrupt // irq handl...
```assembly //============================================================ // .efo header //============================================================ .pc = $2000 .text "EFO2" // fileformat magic .word prepare // prepare routine .word setup // setup routine .word interrupt // irq ha...
31383871-cf03-4c38-a819-57d50307e878
{ "language": "Assembly" }
```assembly ``` Add completely untested multitasking code
```assembly 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 ...
78fc248e-c70a-4867-b678-05e2325dc349
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
5164f4c7-1f02-4b99-ba87-a901a018300f
{ "language": "Assembly" }
```assembly ``` Add PoR patch to fix bonus STR not affecting martial art
```assembly .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 ...
4d74f09a-b922-423c-9cfc-308933196ee3
{ "language": "Assembly" }
```assembly ; 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``` Return 0 for no items
```assembly ; 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```
c8bdf47e-9d4f-4cbb-84b0-4f41ca608e7b
{ "language": "Assembly" }
```assembly ``` Add patch to make wygol unlocked from the start in OoE
```assembly .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 bi...
30c05deb-dc75-4a40-929e-6638815daae1
{ "language": "Assembly" }
```assembly 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``` Write to 0x...
```assembly 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```
11e17dd6-aa68-4a68-8113-232350eef2d5
{ "language": "Assembly" }
```assembly 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
```assembly bits 64 VFMADDPD xmm0, xmm1, [0], xmm3 VFMADDPD xmm0, xmm1, xmm2, [0] VFMADDPD ymm0, ymm1, [0], ymm3 VFMADDPD ymm0, ymm1, ymm2, [0] ```
80e93c3a-ef64-40d6-b522-ad15c46e6f27
{ "language": "Assembly" }
```assembly ``` Add test for BR 3187743
```assembly ;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] ```
3d0eb7a7-2679-40bf-b45c-d5decfb81f92
{ "language": "Assembly" }
```assembly ; ; 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 TH...
```assembly ; ; 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 TH...
ab615496-3250-480f-8cc6-255579860c15
{ "language": "Assembly" }
```assembly ``` Add patch to prevent overlapping events in first room of DoS
```assembly .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 ...
daab9ce2-e6e9-4073-8182-2c253bc8e4b5
{ "language": "Assembly" }
```assembly ``` Add patch for boss orbs to reload some boss rooms in OoE
```assembly .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 random...
2b24b217-4c8c-4d03-850c-1dfac3ee6121
{ "language": "Assembly" }
```assembly ``` Test of immediate handling on 64-bit mode
```assembly 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 12...
73b93680-afbd-4287-92d9-ee952a0ebf30
{ "language": "Assembly" }
```assembly ``` Add patch to remove Shanoa back glow
```assembly .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 ```
6cab3722-2483-4d18-840c-b0c7d996f962
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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. ;; Yo...
```assembly ;;----------------------------------------------------------------------------;; ;; 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. ;; Yo...
fcc7c7fe-0201-41ee-8e59-2460eba1049d
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
6ad7dbb3-9a42-4820-8be4-6b528e680777
{ "language": "Assembly" }
```assembly ``` Test for various ELF64 GOT references
```assembly ;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 ...
85d0b7a3-1161-4950-bbfb-b2f48a1f9441
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 complia...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 complia...
0bc14b35-43c2-43cc-8105-03ac6b0dc363
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 ...
0eae96fe-225e-4dc5-a22a-6005a5738ea3
{ "language": "Assembly" }
```assembly .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_han...
```assembly .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_h...
bc44109b-479b-4bbe-977c-457622c95496
{ "language": "Assembly" }
```assembly ``` Add sample code for ApplePi.
```assembly # 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 ```
098ecbcb-c6b1-4d2f-91dd-67690d30bf72
{ "language": "Assembly" }
```assembly 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. ...
```assembly 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_exi...
5ee2ccb0-023b-4339-bf09-5ee8b2565c8b
{ "language": "Assembly" }
```assembly ``` Implement yes in NASM for Mac OS X 64-bit
```assembly 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' ```
9065d925-690f-4ded-a9b1-fa058b83f9a8
{ "language": "Assembly" }
```assembly ``` Add patch to prevent softlocks entering lighthouse from wrong door
```assembly .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 play...
8fc8fb87-3b7f-4d12-84d6-24217dbf5c87
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
77b12d85-c501-456a-824e-d28b349fb3fb
{ "language": "Assembly" }
```assembly ``` Fix BR 1490407: size of the second operand of LAR/LSL
```assembly 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] ```
96f0fd30-7dd4-451d-b2d8-f18d133aaeb0
{ "language": "Assembly" }
```assembly ``` Add armips patch to fix the vanilla PoR death softlock
```assembly .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 ...
2f1fb537-250b-4b7d-94d9-b2bd8b0c8502
{ "language": "Assembly" }
```assembly ``` Add patch to make spells always act fully charged
```assembly .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 ; ...
a8f9c6d9-91a2-44e0-a211-097fb3d271bc
{ "language": "Assembly" }
```assembly ``` Add patch to always show drop percentages in PoR
```assembly .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. ...
8aed5b93-0a30-4781-aa9a-6a3bb9eab8f9
{ "language": "Assembly" }
```assembly ``` Add ARMIPS patch to disable sliding puzzle
```assembly .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 t...
5a9dc90e-4145-4bdf-9b8b-fb2a3aa7d2d9
{ "language": "Assembly" }
```assembly //============================================================ // 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 ...
```assembly //============================================================ // 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 ...
47be38a1-1992-474f-a99a-796aef56d063
{ "language": "Assembly" }
```assembly [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 ...
```assembly [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 ...
39e0cdf7-65de-4d82-a65e-d09ecc738cb3
{ "language": "Assembly" }
```assembly ; 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: ...
```assembly ; 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 ...
52ac2a09-8cad-4ce4-b46f-5f522f12c605
{ "language": "Assembly" }
```assembly ``` Add a test for various 32- and 64-bit relocations
```assembly 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 ```
1a5638a7-cc08-408d-93f6-0dd78b0ecdc8
{ "language": "Assembly" }
```assembly 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: ``` Change name of entry function
```assembly 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: ```
753bc18e-315d-4ff1-ac4b-f0f44135e4ad
{ "language": "Assembly" }
```assembly ``` Add patch to add holes into the doors on the map for DoS
```assembly .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 door...
e04d3eb2-3a3d-4650-9031-52054b82273c
{ "language": "Assembly" }
```assembly .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...
```assembly .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...
2bf0b826-fca5-4862-a4c9-6cd34167eb8e
{ "language": "Assembly" }
```assembly add $t0, $t1, $t2 sub $s0, $t0, $v0 exit beq $3, $8, 3 nop nop``` Remove the branch for clarity
```assembly add $t0, $t1, $t2 sub $s0, $t0, $v0 exit add $t0, $t1, $t2 nop nop```
376c673e-e5b8-4e33-8b8c-a4411e9b43b7
{ "language": "Assembly" }
```assembly .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 sp...
```assembly .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 sp...
4d8fa532-6664-42b3-b5d4-5f6dc20f6de4
{ "language": "Assembly" }
```assembly bits 64 jmp rcx call [rax] call qword [rdx] ``` Add more 64-bit jump tests
```assembly ;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] ```
663f0268-67bb-4401-9331-0c8fee0adaf4
{ "language": "Assembly" }
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
```assembly ;;----------------------------------------------------------------------------;; ;; 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 compli...
eb504745-c2da-4a76-a727-38d0365f3941
{ "language": "Assembly" }
```assembly ``` Test for mov [mem], sreg
```assembly 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],...
f1c6523c-0969-4d57-af46-e93e2cfa1d06
{ "language": "Assembly" }
```assembly ``` Add patch to reveal whole map from the start for DoS
```assembly .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...
a01b7fba-007f-4602-b9cb-3ef1fe2aa122
{ "language": "Assembly" }
```assembly ; ============================================================================= ; Copyright (C) 2015 Manolis Fragkiskos Ragkousis -- see LICENSE.TXT ; ============================================================================= ;;; Print routine ;;; I push all the register to the stack. ;;; Set the bios r...
```assembly ; ============================================================================= ; Copyright (C) 2015 Manolis Fragkiskos Ragkousis -- see LICENSE.TXT ; ============================================================================= ;;; Print routine ;;; I push all the register to the stack. ;;; Set the bios r...
fa05747b-4f28-4be6-a8e9-4d1e17f1dff1
{ "language": "Assembly" }
```assembly 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/I...
```assembly 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...
896d2233-b851-4fcb-b511-71305d16b15b
{ "language": "Assembly" }
```assembly ``` Add patch to fix DoS tower boss in boss rando
```assembly .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 ...
56d94005-447a-4749-8737-030b24e0f8c3
{ "language": "Assembly" }
```assembly ``` Add basic background cycler example that is confirmed to work with 6502.Net.
```assembly .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 ...
b4de08bf-aa22-47b5-a4cc-3e6f83b54aaf
{ "language": "Assembly" }
```assembly ``` Test of some addressing modes in 64-bit mode.
```assembly 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],' ' ```
54ddeb2f-b333-4539-89a9-7eba8daf6284
{ "language": "Assembly" }
```assembly ``` Add test for problematic floats
```assembly ;; 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.46e2...
266895ce-ae84-4248-87c3-9096ab10b101
{ "language": "Assembly" }
```assembly ``` Add test cases for IP-relative addressing
```assembly 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 ra...
e5f1981d-ad63-4d29-a0bb-808496aafb06
{ "language": "Assembly" }
```assembly ; 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 ...
```assembly ; 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 ...
fc3179c9-53ca-4e58-9afc-7b2f88971b22
{ "language": "ATS" }
```ats %{# #include <avr/eeprom.h> %} fun eeprom_read_byte (address: int): uint8 = "mac#" fun eeprom_write_byte (address: int, value: uint8): void = "mac#" ``` Add dependent types into EEPROM API
```ats %{# #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#" ```
a2ba9928-a851-482e-a7ef-000c54ff800c
{ "language": "ATS" }
```ats implement main0 () = () ``` Include C raw source code
```ats %{^ #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#" ...
31047fea-7fcd-45cd-8f09-d52765bc3770
{ "language": "ATS" }
```ats ``` Add type to mbed interface
```ats %{^ #include "mbed_interface.h" %} typedef char_p = cPtr0(char) fun mbed_mac_address: (char_p) -> void = "mac#" ```
35bc9b42-b34c-4199-abb2-94a2dbbff2e7
{ "language": "Augeas" }
```augeas (* 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...
```augeas (* 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.e...
fb97f636-fbe9-4904-8d61-a3d6c1d4a577
{ "language": "Augeas" }
```augeas # 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' ....
```augeas # 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 . ...
dcdd5fc3-be7b-4a2c-9573-5bd8c5543e1d
{ "language": "Augeas" }
```augeas (* 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...
```augeas (* 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...
48fc0e06-96ad-4882-9437-20c571118e7f
{ "language": "Augeas" }
```augeas (* 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...
```augeas (* 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\...
0a68973f-1323-4f3d-8b3b-a1b403311b74
{ "language": "Augeas" }
```augeas (* 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.spac...
```augeas (* 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.spac...
cb3f1457-a80f-4251-960c-16d7ed830f96
{ "language": "Augeas" }
```augeas 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)" ] (* T...
```augeas 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)" ] (* T...
f3571220-3e8e-441d-925a-3b7f7fd6a818
{ "language": "Augeas" }
```augeas 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 ...
```augeas 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 ...
52ba9e00-135f-4745-9ccb-7eced4bf858d
{ "language": "Augeas" }
```augeas ``` Add more recent nagios lens
```augeas (* 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: Configurat...
455471e2-3828-440b-a7f9-9264bcdad3ce
{ "language": "Augeas" }
```augeas ``` Add test for radicale lens
```augeas 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" {} } ...
3a6e04c4-99d0-4c02-b39a-b99acb0b324e
{ "language": "Augeas" }
```augeas ``` Add basic EPSG augeas lens
```augeas 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 | entr...
89906969-fc7f-4021-af32-3545be1b6756
{ "language": "Augeas" }
```augeas (* 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)...
```augeas (* 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)...
39361fda-bd76-43fc-bd4d-5b5fe5203d62
{ "language": "Augeas" }
```augeas # 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...
```augeas # 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...
7dfcedf2-e94e-4c33-8a19-0f33de5a46e2
{ "language": "Augeas" }
```augeas ``` Check that let expressions work
```augeas (* 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:...
c0f55f2f-dce5-4087-8971-f5ac1227b99d
{ "language": "AutoHotkey" }
```autohotkey #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 ...
```autohotkey #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 ...
fec57496-16b7-48ad-b7a5-55b5ef9d7dc0
{ "language": "AutoHotkey" }
```autohotkey 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 ...
```autohotkey 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/bnethel...
251a16ea-70c6-4e59-bd8b-751168e10080
{ "language": "AutoHotkey" }
```autohotkey ; 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 hotkeys for changing keyboard language.
```autohotkey #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 } Ge...
535a22f7-1779-49a5-8ae1-9143520dcc93
{ "language": "AutoHotkey" }
```autohotkey ; ahk_class PotPlayer #SC01F::Send {Media_Play_Pause}``` Add special characters for Persian keyboard.
```autohotkey ; ahk_class PotPlayer #SC01F::Send {Media_Play_Pause} $+1::Send {!} $+2::Send {@} $+3::Send {#} $+4::Send {$} $+5::Send {`%} $+6::Send {^} ;$+7::Send {&} $+8::Send {*} ```
e11461fe-2f9e-4df1-9526-632bb7c171f1
{ "language": "AutoHotkey" }
```autohotkey 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 <^...
```autohotkey 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...
4925471a-580f-46c7-bcd3-d57491393676
{ "language": "AutoHotkey" }
```autohotkey 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 Sh...
```autohotkey ; 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 ...
d48892d7-0c5b-4a63-97a2-8e3c6961567a
{ "language": "AutoHotkey" }
```autohotkey ``` Add some device specific keyboard modifications.
```autohotkey #Include, %A_ScriptDir% #InstallKeybdHook #SingleInstance, Force Capslock & ScrollLock:: Send, {ScrollLock} Capslock & Pause:: Send, {Pause} ScrollLock::Home Pause::End Insert & Backspace::Send, {AppsKey} ```
b394a578-fa47-4918-ada6-71b355e333db
{ "language": "AutoHotkey" }
```autohotkey ``` Add ahk-script to duplicate window width (useful with vertical monitors)
```autohotkey +#Up:: WinGetActiveTitle, Title WinRestore, %Title% SysGet, X1, 76 SysGet, Y1, 77 SysGet, Width, 78 SysGet, Height, 79 WinMove, %Title%,, X1, Y1, Width, Height return ```