content stringlengths 23 1.05M |
|---|
; A317551: Fertility numbers.
; 0,1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,27,28,29,30
mov $2,$0
div $0,3
lpb $0
mov $0,6
lpe
mov $1,$0
add $1,$2
|
# C1-0--0
ldsi s0, 3 # 0
ldsi s1, 4 # 1
subs s3, s0, s1 # 2
bit s195 # 3
adds s114, s195, s195 # 4
bit s155 # 5
adds s196, s114, s155 # 6
adds s115, s196, s196 # 7
bit s156 # 8
adds s197, s115, s156 # 9
adds s116, s197, s197 # 10
bit s157 # 11
adds s198, s116, s157 # 12
adds s117, s198, s198 # 13
bit s158 # 14
adds s19... |
.message Sure hope this doesn't crash.
.constant SCREEN 0xFE
.constant KEYB 0xFF
.constant CR 0xD
.constant LF 0xA
!crlf
.variable crlf0 CR
.variable crlf1 LF
.variable crlf2 0
!prompt
.variable prompt0 'E'
.variable prompt1 'n'
.variable prompt2 't'
.variable prompt3 'e'
.variable prompt4 'r'
.variable prompt5 ... |
//push const 17
@17
D=A
@SP
A=M
M=D
@SP
M=M+1
//push const 17
@17
D=A
@SP
A=M
M=D
@SP
M=M+1
//EQ
@SP
AM=M-1
D=M
A=A-1
D=M-D
@LABEL.EQ.TRUE.1
D;JEQ
@SP
A=M-1
M=0
@LABEL.EQ.FALSE.1
0;JMP
(LABEL.EQ.TRUE.1)
@SP
A=M-1
M=-1
(LABEL.EQ.FALSE.1)
//push const 17
@17
D=A
@SP
A=M
M=D
@SP
M=M+1
//push const 16
@16
D=A
@SP
A=M
M=D
@... |
IDD_DLGADDINMANAGER equ 6100
IDC_LSTADDINS equ 1001
IDC_BTNHELP equ 1002
.const
szAddinPath db '\Addins\',0
szAllDll db '*.dll',0
szHelpPath db '\Addins\Help\',0
.data?
lpOldAddinListProc dd ?
.code
AddinListProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM... |
MODULE fputc_cons_generic_minimal
defc SUPPORT_vt52=1
; Extra VT52 codes - clear to end of line + clear to end of screen + underlined
defc SUPPORT_vt52x=0
defc SUPPORT_zxcodes=1
SECTION code_... |
CeladonMartRoofScript:
call EnableAutoTextBoxDrawing
ret
CeladonMartRoofScript_GetDrinksInBag:
; construct a list of all drinks in the player's bag
xor a
ld [wFilteredBagItemsCount], a
ld de, wFilteredBagItems
ld hl, CeladonMartRoofDrinkList
.loop
ld a, [hli]
and a
jr z, .done
push hl
push de
ld [wd11e], a... |
DEVICE ZXSPECTRUM48
BPLIST "dir_setbp.exp" zesarux ; valid breakpoints file
SETBP 0x1234
setbp 0xBCDE
ORG $2345
SETBP ; default = "$"
BPLIST "dir_setbp.exp" unreal
; value truncating warnings
.SETBP 0x10000
.setbp -1
; syntax error test
SETBP &
|
SECTION .text
GLOBAL mul_p521
mul_p521:
sub rsp, 0x3a8 ; last 0x30 (6) for Caller - save regs
mov [ rsp + 0x378 ], rbx; saving to stack
mov [ rsp + 0x380 ], rbp; saving to stack
mov [ rsp + 0x388 ], r12; saving to stack
mov [ rsp + 0x390 ], r13; saving to stack
mov [ rsp + 0x398 ], r14; saving to stack
mov [ rsp + 0x... |
; BINARY SEARCH
.model small
.stack
.386
.data
ARRAY DB 9 DUP(?)
MESS01 DB 13,10,"MAX. NO. OF ELEMENTS IN ARRAY IS 9 $"
MESS02 DB 13,10," $"
MESS1 DB 13,10,"ENTER THE NUMBER OF ELEMENTS: $"
MESS0 DB 13,10,"ENTER THE NUMBER: $"
MESS2 DB 13,10,"ENTER THE ELEMENT TO BE SEARCHED: $"
MESS3 DB 13,10,"VALUE FOUND AT LOCAT... |
arch none
org $303f00
incbin "song.spc"
arch snes.cpu
lorom
org $8be096
jsl $e08000
define AUDIO_R0 $2140
define AUDIO_R1 $2141
define AUDIO_R2 $2142
define AUDIO_R3 $2143
define XY_8BIT $10
define A_8BIT $20
define waitforaudio "-; cmp {AUDIO_R0}; bne -"
define spcfreeaddr $ff80
// Set up labels for use in c... |
lda {m2}
sta $ff
clc
adc ({z1}),y
sta ({z1}),y
iny
lda $ff
ora #$7f
bmi !+
lda #0
!:
adc ({z1}),y
sta ({z1}),y |
INCLUDE sas.inc
_DATA SEGMENT BYTE PUBLIC 'DATA' USE16
SAS SASSTRC <'SAS ', 0, 0, 0, 0, 0, 0, 0, 0 ,0>
_DATA ENDS
end |
COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: User/Text
FILE: taRunManip.asm
ROUTINES:
Name Description
---- -----------
EXT TA_UpdateRunsForReplacement Update all run structures to ... |
;
; zx_circle: demo of Breseham's circle with integers using Z80 ASM
;
; (c) Rui Ribeiro 2020
;
; MIT License
;
; pasmo --tapbas zx_circle.asm zx_circle.tap
;
; CIRCLE routine is invoked with:
;
; Center of circle:
;
; H = Y
; L = X
;
; E = radius in pixels
;
;
; PLOT routine, used by CIRCLE. Can be directly invok... |
%include "macros/patch.inc"
%include "macros/datatypes.inc"
%include "TiberianSun.inc"
; Keeps sidebar icons sorted. Each category (buildings, vehicles, infantry, aircraft, SWs)
; is sorted in the order of the objects' appearance in the respective object type lists in Rules.ini.
; The non-building categories (as build... |
#import "64spec/lib/64spec.asm"
#import "../lib/math-global.asm"
sfspec: init_spec()
describe("dec16")
it("of 0 gives 65535"); {
c64lib_dec16(dec16ZeroActual)
assert_equal16 dec16ZeroActual: dec16ZeroExpected
}
it("of 5 gives 4"); {
c64lib_dec16(dec16Actual)
assert_equal16 dec16Actual: dec16E... |
; ;Enemizer Flags
EnemizerFlags:
.randomize_bushes
db #$00 ;408100 : 200100 ; Enable random enemy under bushes
.close_blind_door
db #$00 ;408101 : 200101 ; Enable blind's door closing for other bosses
.moldorm_eye_count
db #$01 ;408102 : 200102 ; Moldorm eye count, default to 2 eyes (1)
.randomize_sprites
db #$00 ;4081... |
.file "(extract)sblat2.f"
.section .rodata
.align 4
.LC00000000:
.long 1
.LC00000004:
.long 0
.LC00000008:
.long 47
.LC0000000C:
.long -1
.LC00000010:
.long 78
.LC00000014:
.long 2
.LC00000018:
.long 85
.LC0000001C:
.string "( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )"
.LC0000004C:
.ascii "( ' ***... |
.include "tn84def.inc"
main:
SER R17 ; R17 = 0xFF
OUT DDRA, R17 ; Make all pins in PORTA as Output
LDI R16, 1 ; R16 = 1
loop:
OUT PORTA, R16 ; PORTA = R16
ROL R16 ; Rotate R16 to left through carry
RCALL delay ; Call delay subroutine
RJMP loop ; repeat from loop
delay:
SER R18 ; R18 = 0xFF
d2: SER R17 ; R1... |
name io
; this file contains functions
; for console input and output
.model small
.data
; exports
public print_string
public print_number
public read_char
public read_string
.code
; prints a string, push the address of the string,
; the string must be 0-terminated
print_string ... |
.include "hw.asm"
.include "defines.asm"
.include "game.asm"
.include "rng.asm"
.include "wordlist.asm"
; RAM allocations
* = $80
r0 .word ?
r1 .word ?
rng_state .fill 3
clear_start
flags .byte ?
joy_last .byte ?
cursor_pos .byte ?
game_state .byte ?
an... |
Name: tire.asm
Type: file
Size: 5116
Last-Modified: '1992-12-11T02:06:28Z'
SHA-1: E982FD6681903388AE02367951853BA7FD797FB5
Description: null
|
; Test case:
ld hl,array,de,array+1,bc,3 : ldi
array:
db 0,0,0,0 |
;===============================================================================
;string.asm
;===============================================================================
;
;-------------------------------------------------------------------------------
;///////////////////////////////////////////////////////... |
; pixel animation fx for grid
.fx_anim_start
.fx_anim_init
{
STX fx_anim_ptr
STY fx_anim_ptr+1
LDY #0
STY fx_anim_num_loops
LDA (fx_anim_ptr), Y
STA fx_anim_x
INY
LDA (fx_anim_ptr), Y
STA fx_anim_y
INY
STY fx_anim_idx
JSR fx_anim_init_step
RTS
}
.fx_anim_init_loop
{
\\ Next byte is number of loop... |
;boot.asm:the bootloader to boot are operating system with grub
[bits 32] ;we are in 32 bit
global start ;start's the operating system:we call it in the linker script
extern _kernel_main ;this is in are .cpp file and it is the main function of are kernel
;do not modify these lines(these are needed by grub)!
section .mb... |
;
; Generic game device library - Aquarius port
; Stefano Bodrato - 2017
;
; $Id: joystick.asm $
;
SECTION code_clib
PUBLIC joystick
PUBLIC _joystick
EXTERN getk
.joystick
._joystick
;__FASTALL__ : joystick no. in HL
;ld a,l
call getk
ld a,l
ld l,0
cp 'm'
jr nz,no_fire1_a
set 4,l
jr j_d... |
[bits 16]
; Returns in ax min(ax, bx)
; (Does unsigned comparison)
wmin:
cmp ax, bx
jae wmin_ax_bigger
ret
wmin_ax_bigger:
mov ax, bx
ret |
# Hello world
.data
string:
.ascii "Hello World\n"
.text
.globl _start
_start:
movl $4, %eax #write sys call number
movl $1, %ebx #fd, stdout
movl $string, %ecx #string address to char *
movl $11, %edx #length of string
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80
|
; ASM source file created by SevenuP v1.21
; SevenuP (C) Copyright 2002-2007 by Jaime Tejedor Gomez, aka Metalbrain
;GRAPHIC DATA:
;Pixel Size: ( 24, 32)
;Char Size: ( 3, 4)
;Frames: 6
;Sort Priorities: X char, Char line, Y char, Frame number
;Data Outputted: Gfx
;Interleave: Sprite
;M... |
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 120
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %56
OpExecutionMode %4 OriginU... |
.nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
.org 0x0203E514
push r1, r14
mov r0, 4h
bl 0203BE9Ch ; Set the top screen to 4 (cross with bat wings).
mov r0, 0h ; Save file 0.
bl 02010BC4h ; Load a save file.
ldr r1, =020F6DF7h
mov r0, 0h
strb r0, [r1] ; unknown value we h... |
Sound_88_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_88_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound_88_FM5, $05, $0C
; FM5 Data
Sound_88_FM5:
smpsSetvoice $00
smpsModSet $01, $01, $02, $76
dc.b nAb2, $11
smpsStop
Sound_88_Voices:
; Voic... |
.text
.globl main
main:
addi $a0, $zero, 17
jal fib
j end
# Patterson & Henessy 5ed. ex2.31: int fib(int n)
fib:
slti $t0, $a0, 2 # t0 = (n < 2)
beq $t0, $zero, fib_rec # if !(t0), goto fib_rec
# else, return n
add $v0, $zero, $a0
j fib_ret
fib_rec:
addi $sp, $sp, -12
sw $ra, 8($sp) # push return add... |
include 'c8.asm'
org 0x200
;
; sub sum
; a = 1
; b = 2
; let c
; c = a + b
; draw( 0, 0, c )
; endsub
;
; cls()
; gosub sum
;
jmp _start
_global:
.dummy db 0
.stk_idx db 0 ; last stack index
.reg_dump db 16 dup 0
_start:
hires
; clear screen
cls
mov v0, 0xB
call _sub.sum
hex v0
mov v1, 6
m... |
dc.w byte_4BA6-Ani_TitleSonicWink
byte_4BA6: dc.b 2, 1, 3, 7, 2, 5, 4, $67, 4, $2F, $FF, 0
|
; Loads tile patterns for tiles used in the pokedex.
LoadPokedexTilePatterns:
call LoadHpBarAndStatusTilePatterns
ld de, PokedexTileGraphics
ld hl, vChars2 tile $60
lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10
call CopyVideoData
ld de, PokeballTileGraphics
ld hl, vChars2... |
stack START 0
EXTDEF stinit
EXTDEF push
EXTDEF pop
stinit STA stackptr . initialize stack at the address from A
RSUB
push STA @stackptr . push value from A to stack
LDA stackptr
ADD #3
STA stackptr
RSUB
pop LDA stackptr . pop value from stack to A
SUB #3
STA stackptr
LDA @stackptr
RSUB
s... |
.MODEL SMALL
.STACK 100H
.DATA
;variables
.CODE
MAIN PROC
;initialize DS
MOV AX,@DATA
MOV DS,AX
; enter your code here
mov bx, 080h ;setting bx to 80h ascii char
mov cl, 0 ;counter as 0
start:
cmp bx, 0ffh
je finish
mov ah, 2
mov dx, bx
int 21h
mov ah,2
mov dx,' '
int 21h
inc cl
cmp cl,10
je ... |
SSAnne1F_Script:
call EnableAutoTextBoxDrawing
ret
SSAnne1F_TextPointers:
dw SSAnne1Text1
dw SSAnne1Text2
SSAnne1Text1:
text_far _SSAnne1Text1
text_end
SSAnne1Text2:
text_far _SSAnne1Text2
text_end
|
; ------------------------------------------------------------------
; MichalOS Notes
; ------------------------------------------------------------------
; NOTES.NDB file structure:
; ORG 8000h
; note_count dw X
; note_db times X dw note_ptr, note_size, year, month + day * 256, hours + minutes * 256
; note_data time... |
global enable_paging:function (enable_paging.end - enable_paging)
enable_paging:
mov eax, [esp + 4] ; load page dir
mov cr3, eax
mov eax, cr0
or eax, 0x80000001
mov cr0, eax
ret
.end: |
; Find the first sector of a file
; si: address of the filename in memory
; TODO: figure out how to handle files that don't exist
; TODO: take DIRECTORY_WINDOW in bx
get_first_sector:
push bx
push cx
mov ax, 19
get_first_sector_loop:
; TODO: this is hardcoded to the root directory on a 1.44MB ... |
global _start
section .text
_start:
mov rax, 1
mov rdi, 1
mov rsi, hello_world
mov rdx, length
syscall
mov rax, 60
mov rdi, 1
syscall
section .data
hello_world: db 'hello world', 0xa
length: equ $-hello_world
|
.586
.model flat, stdcall
option casemap:none
injected_thread proto
include inc\windows.inc
include inc\kernel32.inc
include inc\user32.inc
include inc\urlmon.inc
includelib lib\kernel32.lib
includelib lib\user32.lib
includelib lib\urlmon.lib
includelib lib\srt.lib
XOR_KEY = 90
crypt macro string
... |
; :::
#subruledef opcode
{
A => 0x1
B => 0x2
C => 0x3
}
#subruledef condition
{
X => 0xa
Y => 0xb
Z => 0xc
{} => 0xa ; empty pattern, default to X
}
#subruledef instruction
{
{opc: opcode}{cnd: condition} => opc @ cnd
}
#ruledef
{
{ins: instruction} {val: u8} => ins @ val
}
A ... |
GLOBAL getTimeRTC
SECTION .text
getRTC:
push rbp
mov rbp, rsp
push rbx
mov rbx, [rbp+24]
xor rax, rax
mov al, [rbp+16]
out 70h, al
in al, 71h ; Obtengo las horas/minutos/segundos según [rbp+16]
call BCDtoDec
mov [rbx], eax
pop rbx
leave
ret
BCDtoDec:
mov dl, al
mov cl, dl
shr c... |
SECTION code_fp_math32
PUBLIC ___uint2fs
EXTERN cm32_sdcc___uint2fs
defc ___uint2fs = cm32_sdcc___uint2fs
|
.text
.globl main
main:
li $s0, -1 # variável de controle do loop # a
li $s1, 0 # variável da soma # som
li $s2, 0 # variável de leitura # b
li $s3, 2048 # variaável 2 de controle do loop # b
loop:
li $v0, 5 # leitura de número inteiro
syscall
addi $s2, $v0, 0 # variável que aarmazena o valor em b
b... |
;
; as per the System-V ABI, registers are allocated in the order:
; rdi, rsi, rdx, rcx, r8, r9
;
; just some stuff its nice to have globally
global sdl_rect_a
global sdl_rect_b
global screen
global screen_format
global draw_rect_a
global draw_rect_b
global draw_tree
global draw_stage
extern ticks
extern linearmap
... |
SECTION code_clib
PUBLIC fputc_cons_selector
PUBLIC _fputc_cons_selector
PUBLIC set_fputc_cons
PUBLIC _set_fputc_cons
EXTERN fputc_cons_generic
fputc_cons_selector:
_fputc_cons_selector:
IF __CPU_GBZ80__
ld hl,__fputc_cons_selector
ld a,(hl+)
ld h,(hl)
ld l,a
ELSE
ld hl,(__fputc_cons_selector)
ENDIF
push hl... |
SECTION code_fcntl
PUBLIC asm_tty_param_b_action
EXTERN asm_tty_state_get_1
EXTERN asm_tty_state_param_store
asm_tty_param_b_action:
; c = action code
; stack = & tty.action
; command code has one parameter and action is invoked
ld de,asm_tty_state_get_1
jp asm_tty_state_param_store
|
;
; lab03D.asm
;
; Created: 2017/9/14 23:15:41
; Author : LI JINGCHENG
;
; Replace with your application code
.include "m2560def.inc"
.def temp = r17
.def time = r18
.def second = r20 ; stores an LED pattern
.def minute = r19
.macro clear
ldi YL, low(@0) ; load the memory address to Y po... |
; unsigned long ftell_unlocked_fastcall(FILE *stream)
SECTION code_clib
SECTION code_stdio
PUBLIC _ftell_unlocked_fastcall
EXTERN asm_ftell_unlocked
_ftell_unlocked_fastcall:
push hl
pop ix
jp asm_ftell_unlocked
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: cgroupUtils.asm
AUTHOR: Chris Boyke
METHODS:
Name Description
---- -----------
FUNCTIONS:
Scope Name Description
----- ---- -----... |
editSetup:
.IF SRAM_MAP=32
lda #SRAM_HEADER_BANK
jsr setMMC1r1
.ENDIF
lda writeScreen
beq @a
jsr writeSetupScreen
dec writeScreen
beq @a
jsr writeSetupHeaderFooter
lda #$01
sta dmaUpdateHeader
sta dmaUpdateTitle
lda #$00
sta writeScreen
@a: jsr globalKeys ;global keys
lda writeScreen... |
.code
EditAcl PROC
mov rax, qword ptr gs:[188h]
mov rax, qword ptr [rax + 220h]
mov rcx, rax
mov rax, [rax+240h]
procloop:
lea rbx, [rax-240h]
mov rax, [rax]
add rbx, 450h
cmp dword ptr [rbx], 6c6e6977h
jne procloop
sub rbx, 458h
mov rax, qword ptr [rbx]
and rax, 0FFFFFFFFFFFFFFF0h
add ra... |
db 6 ;speed
;sequence
loop
dw ptn0
dw ptn0
dw ptn1
dw ptn0
dw ptn5
dw ptn3
dw ptn4
dw ptn6
dw 0
;pattern data
ptn0
dw #ff80,#8080,#8080,#180,#300,#600,#0
dw #ff00,#8080,#8080,#180,#391,#0,#0
dw #401,#8080,#8020,#180,#47f,#c0,#18bb
dw #401,#8080,#8020,#180,#558,#c0,#18bb
dw #ff80,#8080,#8040,#300,#600... |
org 100h
K1 EQU 2 ;Allocate first constant value
K2 EQU 4 ;Allocate second constant value
K3 EQU 6 ;Allocate third constant value
MOV AX, K1 ;Allocate first value
MOV BX, AX ;Add and store sum in BX register
... |
# Trevor Hickey
# Code was written in MARS 4.2
# Program Description:
# This program gets a random number between 0 and 100
.data
message: .asciiz "Requesting Random Number From The Matrix...\n"
message2: .asciiz "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nYour Random Number Is: "
newline: .asciiz "\n"
spac... |
; vim: ft=nasm ai
%include "cext.inc"
GLOBALC vacall
[SECTION .text]
[BITS 32]
vacall:
push ebp
mov ebp, esp
push esi
mov esi, [ebp + 16]
mov ecx, [ebp + 12]
test ecx, ecx
jz .done
lea esi, [esi + ecx * 4 - 4]
std
.again:
lodsd
push eax
loop .again
cld
.done:
call [ebp + 8]
add esp, [ebp + 12]
... |
;
; HFD - High Frequency Divider Modulator
; only for compatibility with the original SFX engine
HFD_MODE
lda (dataPtr),y ; get modulate value
sta chnModVal
bne decode_HFD ; check modulation
jmp modMode_notDefined ; if 0, means no modulation
decode_HFD
cm... |
;@DOES move a file into archive
;@INPUT IX = file handle pointer
;@OUTPUT Z flag set if success
;@OUTPUT C flag set if not enough memory
;@DESTROYS All
;@NOTE does nothing if file is already in archive
fs_MoveFileToArc:
bit fs_RAM_bit,(ix)
jr z,.inarc ;in archive already
ld iy,(ix+4) ; VAT pointer
ld hl,(iy+15) ; ... |
; QL Arithmetic Raise to Power V2.01 1990 Tony Tebby QJUMP
section qa
xdef qa_power
xdef qa_powin
xref qa_square
xref qa_dup
xref qa_mul
xref qa_div
xref qa_recip
xref qa_swap
xref qa_put1
;+++
; QL Arithmetic: Raise to Power (positive or negative)
;
; This routine pops the integer at TOS and raises N... |
.global start
.global stack
.global reset
.text
.thumb
.align 0
start:
@
@ Insert code
@
@ Fix for SAM-BA stack bug
ldr r0, reset
cmp r0, #0
bne return
ldr r0, stack
mov sp, r0
return:
bx lr
.align 0
stack:
.word ... |
ASSUME cs:code, ds:data
data segment
n db 10
x dw ?
data ends
code segment
start:
mov ax, data
mov ds, ax
mov cx, word ptr n
mov ax, 0
jcxz end_of_program
bucla:
add ax, cx
loop bucla
end_of_program:
mov x, ax
mov ax, 4c00h
int 21h
code ends
end start
|
;
; Part of OS4, syscall_wrapper
; Author: Mikael Henriksson, miklhh
;
section .text
global syscall_wrapper
syscall_wrapper:
extern syscall
call syscall
iret
|
; Traffic ligts test 2 for
; c:\emu8086\devices\Traffic_Lights.exe
; This is just an example of how to set the lights,
; better if you run it in step-by-step mode.
; DO NOT RUN AT MAXIMUM SPEED, DO NOT USE REAL CARS.
;)
#start=Traffic_Lights.exe#
name "traffic2"
yellow_and_green equ 0000_0110b
... |
; See data/maps/scenes.asm for which maps have scene variables.
; Each scene_script and coord_event is associated with a current scene ID.
; Scene variables default to 0.
SCENE_DEFAULT EQU 0
; Often a map will have a one-time default event for scene 0, and switch to a
; do-nothing scene 1 when the event finishes.
SCE... |
; 6309 instruction set test
DIRECT EQU $44
EXTEND EQU $4558
INDEX_B EQU $58
INDEX_W EQU $4958
IMMED_B EQU $49
IMMED_W EQU $494D
IMMED_Q EQU $51554144
NEG <DIRECT
OIM <DIRECT ; 6309
AIM <DIRECT ; 6309
COM <DIRECT
LSR <DIRECT
EIM <DIRECT ; 6309
ROR <DIRECT
ASR <DIRECT
ASL <DIRECT
ROL <DIRECT
DEC <DIRECT
... |
PokemonTower7F_Script:
call EnableAutoTextBoxDrawing
ld hl, PokemonTower7TrainerHeader0
ld de, PokemonTower7F_ScriptPointers
ld a, [wPokemonTower7FCurScript]
call ExecuteCurMapScriptInTable
ld [wPokemonTower7FCurScript], a
ret
PokemonTower7Script_60d18:
xor a
ld [wJoyIgnore], a
ld [wPokemonTower7FCurScript],... |
# $Id: 02_add_r1.asm,v 1.3 2001/03/22 00:38:59 ellard Exp $
#
# Copyright 1999-2001 by the President and Fellows of Harvard College.
# See LICENSE.txt for license information.
#
#@ tests add for r1
# OK
lc r2, 1
add r1, r2, r2
hlt
|
; Glidix kernel
;
; Copyright (c) 2014-2017, Madd Games.
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
;
; * Redistributions of source code must retain the above copyright notice, this
; list... |
xor a
ld hl, basescradr + #0876
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0896
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a... |
// COMMAND #1: push constant 17
@17
D=A // store the current address as a value
@SP // >> push constant value (17) onto stack <<
A=M // move to top of stack
M=D // write value of D to current location
@SP // increment stack pointer
M=M+1
// COMMAND... |
; Substitute for z80 cpir instruction
; aralbrec 02.2008
; flag-perfect emulation of cpir
SECTION code_crt0_sccz80
PUBLIC __z80asm__cpir
.__z80asm__cpir
jr nc, enterloop
call enterloop
; scf clears N and H - must set carry the hard way
push af
ex (sp),hl
set 0,l ; set carry
jr retflags
.... |
// seed 1
lbi r0, 143 // icount 0
slbi r0, 118 // icount 1
lbi r1, 232 // icount 2
slbi r1, 61 // icount 3
lbi r2, 198 // icount 4
slbi r2, 91 // icount 5
lbi r3, 65 // icount 6
slbi r3, 85 // icount 7
lbi r4, 199 // icount 8
slbi r4, 175 // icount 9
lbi r5, 153 // icount 10
slbi r5, 189 // icount 11
lbi r6, 36 // icou... |
segment .data
value1: db "", 0
value2: db "", 0
sum: db "", 0
segment .bss
;New line string
newLine: db 0x0a
segment .text
global _start
_start:
;Get value1
mov rax, 0
mov rdi, 0
mov rdx, 2
mov rsi, value1
syscall
;Get value2
mov rax, 0
mov rdi, 0
mov rdx, 2
mov rsi, value2
syscall
... |
; void bit_fx_fastcall(void *effect)
SECTION code_clib
SECTION code_sound_bit
PUBLIC _bit_fx_fastcall
EXTERN asm_bit_fx
defc _bit_fx_fastcall = asm_bit_fx
|
#MULTU INSTRUCTION
#1 A=0x80000_0000-0xFFFF_0000, B=0x0000_0000-0x0000_7FFF
lui $1 0x8000
ori $1 0x0000
lui $2 0x0000
ori $2 0x0000
lui $3 0x0000
ori $3 0x0000
lui $4 0x0000
ori $4 0x0000
multu $1 $2
mfhi $5
mflo $6
bne $3 $5 fail
sll $0 $0 0
bne $4 $6 fail
lui $1 0x4000
ori $1 0x000... |
global emu_rdmsr
global emu_wrmsr
global emu_cpuid
section .text
emu_rdmsr:
mov r9,rdx
rdmsr
mov [r9],rdx
mov [r8],rax
ret
emu_wrmsr:
mov rax,r8
wrmsr
ret
emu_cpuid:
mov r10,rcx
mov r11,rdx
mov rax,[r10]
cpuid
mov [r10],rax
mov [r11],rbx
mov [r8],rcx
mov [r9],rdx
ret |
; color data table
; first 9 rows (40 bytes) are used for the color washer
; on start the gradient is done by byte 40 is mirroed in byte 1, byte 39 in byte 2 etc...
color !byte $0a,$0a,$08,$08,$07
!byte $07,$07,$0d,$0d,$0d
!byte $05,$05,$05,$0e,$0e
!byte $06,$06,$03,$03,$03
!byte $04... |
; $Id: bootsector2-triple-fault-1.asm $
;; @file
; Bootsector for testing triple faults.
;
;
; Copyright (C) 2007-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it ... |
; Bugra Ekuklu
; 150120016
; Assembly to generating 1D cellular automata
;
; STACK PARAMETERS MUTATED?
; ebp+8 : Input array (int32_t[BUFSIZ]) NO
; ebp+12 : Length of the input... |
;
; TEST PROGRAM FOR THE 88-DCDD FLOPPY DISK CONTROLLER
; SINGLE STEP TO WATCH ROTATING DISK ON DATA BUS LEDS
;
ORG 100H
MVI A,0 ;ENABLE CONTROLLER, SELECT DISK 0
OUT 8
MVI A,4 ;LOAD HEAD
OUT 9
IN 9 ;LOOK AT SECTOR POSITION
IN 8 ... |
LXI H,5000
MOV B,A
REPEAT:CPI 64
JC NEXT
SUI 64
INR C
JMP REPEAT
NEXT : CPI 0A
JC SKIP
SUI 0A
INR D
JMP NEXT
SKIP:STA 6000
MOV A,C
STA 6001
MOV A,D
STA 6002
HLT
|
;
; Created by Mateusz Stompór on 20/06/2019.
;
%include "source/list.asm"
%include "source/memory_management.asm"
%include "source/sizes.asm"
global LL_ALLOC
section .text
LL_ALLOC:
; allocate storage
push rdi
mov rdi, LL_LIST_SIZE
call ll_mem_allocate
; initialize
xor rsi, rsi
mov rcx, ... |
/**
* Structure for mock instances in RAM, which hold a counter for the times
* the mock has been called and the address to jump to to handle the
* mock logic
*/
.struct smsspec.mock
push_hl db
call_instruction db
call_address dw
times_called db
address d... |
; Desplazamientos de bits para realizar operaciones rápidas de
; multiplicacion y division dentro de los registros de memoria
;------------- Seccion de datos -------------
section .data
; declaracion de caracteres escape
ln db 10, 13
longln equ 2
section .bss
resultado1 resb 1 ; reserva de memoria
result... |
[bits 16]
load_kernel:
mov bx,KernelOffset
mov dh,40
mov dl, [BootDrive]
call disk_load
ret
KernelOffset equ 0x1000 |
db "MANTIS@" ; species name
dw 411, 1230 ; height, weight
db "It's very proud of"
next "its speed. It"
next "moves so fast that"
page "its opponent does"
next "not even know what"
next "knocked it down.@"
|
#include once <stackf.asm>
ASIN: ; Computes ASIN using ROM FP-CALC
call __FPSTACK_PUSH
rst 28h ; ROM CALC
defb 22h ; ASIN
defb 38h ; END CALC
jp __FPSTACK_POP
|
#
# AUTHOR: Ayoub Chouak (a.chouak@protonmail.com)
# FILE: str_replace.asm
# BRIEF: String replace function implemented for the MIPS32 Instruction Set
#
.include "mips_intrins.s"
# Globals
.globl main
.data
sbrk_len:
.word 8
src_key:
.ascii "R"
rplc_key:
.ascii "D" # Replacement key
test_string:
.asciiz "REAR... |
.CODE
InitialSwitchContext PROC
mov [rcx], rbx
mov [rcx + 8], rdi
mov [rcx + 16], rsi
mov [rcx + 24], r12
mov [rcx + 32], r13
mov [rcx + 40], r14
mov [rcx + 48], r15
mov [rcx + 56], rsp
mov [rcx + 64], rbp
mov rax, gs:[0]
mov [rcx + 72], rax
mov rax, gs:[8]
mov [rcx ... |
Map_77626: dc.w word_7762E-Map_77626
dc.w word_77636-Map_77626
dc.w word_7763E-Map_77626
dc.w word_77646-Map_77626
word_7762E: dc.w 1
dc.b $FC, 0, 0, 0, $FF, $FC
word_77636: dc.w 1
dc.b $F4, 5, 0, 1, $FF, $F4
word_7763E: dc.w 1
dc.b $F4, 5, 0, 5, $FF, $F4
word_77646: dc.w 1 ... |
;*******************************************************************************************************************
; Snake Game By *
; HERO-DAI ... |
; -------------------- [ Routine: read_disk_chs ] --------------------
; --------- Reads the specified number of sectors from disk ----------
; input:
; [esp+12] = drive (0 = floppy, 1 = floppy2, 0x80 = hdd, 0x81 = hdd2)
; [esp+10] = sector
; [esp+8] = cylinder
; [esp+6] = head
; [esp+4] = num sectors
; [es... |
.text
.global _start
_start:
movl $1, %eax # 1 表示 32 位 系统 的 exit
int $0x80
|
;nolist
org #1000
OUTPUT "SymbOS-notepad.bin" ; notepad.exe (renamed to trigger test-runner functionality)
INCLUDE "SymbOS-Constants.i.asm"
relocate_start
INCLUDE "App-Notepad-head.i.asm"
INCLUDE "App-Notepad-lib.i.asm"
INCLUDE "App-Notepad.i.asm"
relocate_table
relocate_end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.