content stringlengths 23 1.05M |
|---|
VendingMachineMenu:
ld hl, VendingMachineText1
call PrintText
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
xor a
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
ld a, 3
ld [wMaxMenuItem], a
ld a, 5
ld [wTopMenuItemY], a
ld a, 1
ld [wTopMenuIt... |
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* 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 abo... |
segment .data
fmt: dq "%lld %lld",10, 0
scfmt: dq "%lld %lld",0
prfmt: dq "%lld ",10 , 0
sumfmt: dq "Difference: %lld",10,0
prr: dq "",10,0
ppfmt: dq "Prime(s): ",10,0
segment .bss
prime: resq 100
proc_con: resq 1
main_con: resq 1
parameter: resq 1
l: resq 1
r: resq 1
cnt: resq 1
print_con: resq 1
pcon:... |
; filename: plus1to100.asm
; description: calculate 1 plus to 100 using stack
; jump to the code section to execute
jmp near start
message db '1+2+3+...+100='
start:
mov ax, 0x7c0 ; set data segment base address
mov ds, ax
mov ax, 0xb800 ; set video ram base address
mov es, ax
; show string in ... |
copyright zengfr site:http://github.com/zengfr/romhack
00AB6E tst.b ($4e3,A5)
00AB72 bne $ab76 [base+4E3]
00CC60 tst.b ($4e3,A5) [base+6C8]
00CC64 beq $cc82 [base+4E3]
01E26C move.b #$1, ($4e3,A5) [123p+ D3]
01E272 move.w #$ffff, ($d8,A6) [base+4E3]
01E2BE clr.b ($4e3,A5) [base+4DD]
01E2C2 clr.... |
*---------------------------*
* cmc player v 2.1 *
* by Marcin Lewandowski *
* based on cmc player v 2.0 *
* by Janusz Pelc *
*---------------------------*
*--- tablica basu (chyba)
bass equ 1
*--- strona 0
addr equ $fc
word equ $fe
*--- skoki
jmp basic
jmp init
jmp play
*--- dane
volu... |
; void *zx_saddrpup_fastcall(void *saddr)
SECTION code_arch
PUBLIC _zx_saddrpup_fastcall
_zx_saddrpup_fastcall:
INCLUDE "arch/zx/display/z80/asm_zx_saddrpup.asm"
|
SECTION "Assets", ROMX[$6800], BANK[1]
; The fonts used.
textAssets::
incbin "assets/font.cfx"
textAssetsEnd::
; The space ship asset used.
spaceship::
incbin "assets/spaceship.fx"
spaceshipEnd::
; The space ship asset used.
asteroids::
incbin "assets/asteroids.fx"
asteroidsEnd::
; The background asset used.
... |
SECTION code_driver
PUBLIC asm_x1_keyboard_handler
asm_x1_keyboard_handler:
ld bc, $1A01
.iiki1
in a, (c)
and $20
jr nz, iiki1
ld bc, $1900
in a, (c)
ld hl, _x1_keyboard_io+1
ld (hl), a
dec hl
ld bc, $1A01
.iiki2
in ... |
;/*
; Copyright (C) 2014 Apple Inc. All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; 1. Redistributions of source code must retain the above copyright
; notice, this list of conditions and the... |
.cseg
;.org 0x03
;rjmp timer2_comp_handler ; timer 2 compared
;rjmp timer2_ovf_handler ; timer 2 overflow
;.org 0x05
;rjmp timer1_capt_handler ; timer 1 compared
;rjmp timer1_compa_handler ; timer 1 overflow
;rjmp timer1_compb_handler ; timer 1 overflow
;rjmp timer1_ovf_handler ; timer 1 overflow
.org 0x09
rj... |
bits 32
push ax
pop ax
push eax
pop eax
push word 0x7F
push dword 0x7FFF
push word [bx]
pop word [bx]
push word [ebx]
pop word [ebx]
push dword [bx]
pop dword [bx]
push dword [ebx]
pop dword [ebx]
... |
section .rodata
msg db "Hello World", 0xA ; String to print
len equ $- msg ; Length of string
section .text
global _start ; Specify entry point to linker
_start:
mov eax, 1 ; System call ID (sys_write)
mov edi, eax ; File d... |
00001_0011_00000000000000001010111
00001_0011_0011_0000000000000000001
00000_0010_00000000000000001000010
00001_0010_0010_1111111111111111111
00011_0111_00000000000000000111101
00100_0111_00000000000000000111100
00000_0001_0010_0000000000000000000
00001_0000_00000000000000000000001
11011_00000000000000000000000... |
# SYNTAX TEST "Packages/Assembly-6809/Assembly-6809.sublime-syntax"
# <- source.mc6809
ORG expr
# ^^^ support.function.address
REORG
# ^^^^^ support.function.address
sym EQU expr
; ^^^ support.function.address
; <- entity.name.type.constant
sym = expr
; TODO!
sym SET expr
; ... |
PUBLIC AsmStiInstruction
PUBLIC AsmCliInstruction
PUBLIC AsmGetRflags
.code _text
;------------------------------------------------------------------------
AsmStiInstruction PROC PUBLIC
sti
ret
AsmStiInstruction ENDP
;------------------------------------------------------------------------
AsmCli... |
%include 'libe.inc'
section .text
global _start
_start:
; LEA = Load Effective Address
lea esi, [buffer] ; pointer to begin do buffer
add esi, 0x09 ; move pointer to end of buffer
mov byte[esi], LF ; add \n to buffer
dec esi ; decrement index o buffer
; Convert 2 do '2' (int to string)
m... |
FILL MACRO ADDR, K
PUSH PSW ; Pushing A,flags so as their contents are saved
PUSH D ; Pushing H to the stack so as the contents of HL are saved
MOV A,K ; Move K to A
LXI D,ADDR ; Load ADDR to Pair Register DE
CPI 00H ; Compare A(which is K) if is equal to zero
JZ ISMAX ; if yes th... |
;* General Purpose FInitCsd Routine
;*
NonStandard FInitCsd
;*****************************************************************************
;********** FInitCsd **********
;* entry:
;* pinch = near pointer to INCH structure to fill
;* * Initialize the screen to the given mode
;* exit: AX != 0 if ok
cProc FInitCsd, ... |
; Test writing too much into VRAM in MZ-700 mode
;
; Use z80asm from the z88dk project to build binary file.
; Command line:
; z80asm -b TestMZ700VRAMOverwrite.asm
include "MZ800.inc"
org 02000h
ld a, 01
ld hl, 01000h
ld (hl), a
halt
; Program features
define ClearColor
defc DisplayMode = DisplayMode40x25_... |
.data
#enter: .asciiz " - "
.text
move $t0, $zero
#la $s1, enter
for:
bgt $t0, 100, exit #branch greater than = se for maior que
mul $a0, $t0, 2 #
addi $t0, $t0, 1
li $v0, 1
syscall
#move $a0, $s1
#li $v0, 4
#syscall
j for
exit:
syscall
|
* load first operand from dmem[0]
ADDI x4, x0, 0
BN.LID x4, 0(x0)
* load second operand from dmem[1]
ADDI x4, x0, 1
BN.LID x4, 1(x0)
break
* run multiplication
BN.MULQACC.Z w0.0, w1.0, 0
BN.MULQACC w0.1, w1.0, 64
BN.MULQACC.SO w2.l, w0.0, w1.1, 64
BN.MULQACC w0.2, w1.0, 0
BN.MULQACC w0.1, w1.1, 0
BN.MULQACC w0.0, w1.2... |
;==============================================================
; A系列游戏图形显示相关函数
; 2005/5/17 02:33PM
;
; Copyright (c)2001 , 广东步步高教育电子分公司
; All rights reserved.
;==============================================================
.include picture.h
;=======================================================================... |
Nickolas Decker
CS51 Lab 1
Unsigned Integers Conversion
1. 0b10010011 (Binary)
* 147 (Decimal
* 0x98BD9B (Hexadecimal)
2. 0xD3AD (Hexadecimal)
* 1101001110101101 (Binary)
* 54189 (Decimal)
3. 63 (Decimal)
* 0b111111 (Binary)
* 0x3F (Hexadecimal
4. 0b00100100 (Binary)
* 0x24 (Hexadecimal)
* 36 ... |
bits 16
org 0x0500
start:
jmp loader;
;******** BIOS Parameter Block ********;
BytesPerSector: dw 512
SectorsPerCluster: db 1
ReservedSectors: dw 1
NumFATs: db 2
RootEntries: dw 224
TotalSectors: dw 2880
MediaDescriptor: ... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.42
TITLE c:\djgpp\Demo23\SysCore\FloppyDisk\flpydsk.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
_BSS SEGMENT
__CurrentDrive DB 01H DUP (?)
__FloppyDiskIRQ DB 01H DUP (?)
_BSS ENDS... |
;
; Graphics for the TI82
; By Stefano Bodrato - Dec. 2000
;
; CLOSEGFX - wait for keypress
;
;
; $Id: closegfx.asm,v 1.4 2015/01/23 07:07:31 stefano Exp $
;
PUBLIC closegfx
.closegfx
IF FORti82
; This is called before scrolling: we wait for any keypress
.kloop
;halt ; Power saving (?? maybe. It worked on ti86... |
EXTERN gBlImgAllocateImageBuffer: qword
PUBLIC oBlImgAllocateImageBufferProxy
.code
oBlImgAllocateImageBufferProxy PROC
mov QWORD PTR [rsp + 10h], rbx
jmp [gBlImgAllocateImageBuffer]
oBlImgAllocateImageBufferProxy ENDP
END |
.section/data .executable_name;
.BYTE __executable_name[] = 'haip_controller.dxe', 0;
|
Map_AIZ2BossSmall_:dc.w word_23C266-Map_AIZ2BossSmall_
word_23C266: dc.w 6
dc.b $E4, $E,$20,$86,$FF,$F0
dc.b $F4, 0,$20,$92,$FF,$E8
dc.b $F4, 0,$20,$93, 0,$10
dc.b $FC, $E,$20,$94,$FF,$E0
dc.b $FC, $E,$20,$A0, 0, 0
dc.b $14, $C,$20,$AC,$FF,$F0
|
/* Special support for trampolines
*
* Copyright (C) 1996, 1997, 2000, 2004, 2005, 2009 Free Software Foundation, Inc.
* Written By Michael Meissner
*
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Softwa... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: IBM Proprinter X24 24-pin printer driver
FILE: propx24DriverInfo.asm
AUTHOR: Dave Durran, 26 Mar 1990
REVISION HISTORY:
Name Date D... |
; NES CHR-RAM tile loading routine
;==============================================================================;
; nes_LoadTiles
; Loads 2BPP NES tiles into the NES PPU.
; Destination PPU address should be set before calling this routine.
; (Params)
; tmp00,tmp01 - pointer to tile data
; tmp02 - number of til... |
; Oak's Pokémon Talk will list wild Pokémon on these maps.
OaksPKMNTalkRoutes:
map_id ROUTE_113
map_id ROUTE_112
map_id ROUTE_111
map_id ROUTE_111
map_id ROUTE_110
map_id ROUTE_109
map_id ROUTE_108
map_id ROUTE_107
map_id ROUTE_106
map_id ROUTE_105
map_id ROUTE_104
map_id ROUTE_103
map_id ROUTE_102
map_i... |
user/_wc: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <wc>:
char buf[512];
void
wc(int fd, char *name)
{
0: 7119 addi sp,sp,-128
2: fc86 sd ra,120(sp)
4: f8a2 sd s0,112(sp)
6: f4a6 sd s1,104(sp)
8: ... |
title "Int13 Drive parameter information detection"
;++
;
; Copyright (c) 1989 Microsoft Corporation
;
; Module Name:
;
; diska.asm
;
; Abstract:
;
; This module implements the assembley code necessary to detect/collect
; harddisk paramter information.
;
; Author:
;
; Shie-Lin Tzon... |
;
; Game device library for the PacMan HW
; Stefano Bodrato - 2/2017
;
; $Id:$
;
SECTION code_clib
PUBLIC joystick
PUBLIC _joystick
.joystick
._joystick
;__FASTCALL__ : joystick no. in HL
ld a,l
dec a
jr z,control1
dec a
ret nz
; control2 = ((*in1)&0xf | (((*in1)&0x40)>>2... |
_Route25BattleText1::
text "Local trainers"
line "come here to"
cont "practice!"
done
_Route25EndBattleText1::
text "You're"
line "decent."
prompt
_Route25AfterBattleText1::
text "All #MON have"
line "weaknesses. It's"
cont "best to raise"
cont "different kinds."
done
_Route25BattleText2::
text "Dad too... |
SilverCaveMons:
db $0A
db 20,LARVITAR
db 36,GLIGAR
db 29,QUAGSIRE
db 27,HITMONTOP
db 30,SNORLAX
db 20,PORYGON
db 31,SNEASEL
db 30,PORYGON
db 28,HOUNDOUR
db 32,HERACROSS
db $05
db 25,CHINCHOU
db 30,SEEL
db 20,CHINCHOU
db 30,STARYU
db 35,TENTACOOL
db 30,STARYU
db 20,CHINCHOU
db 30,STARYU
db 30,LANTU... |
; char __fslt (float left, float right)
SECTION code_clib
SECTION code_fp_math48
PUBLIC cm48_sdcciyp_dslt
EXTERN cm48_sdcciyp_dread2, am48_dlt
cm48_sdcciyp_dslt:
; (left < right)
;
; enter : sdcc_float right, sdcc_float left, ret
;
; exit : HL = 0 and carry reset if false
; HL = 1 and c... |
<%
from pwnlib.regsort import regsort
from pwnlib.shellcraft import registers
from pwnlib.shellcraft.amd64 import mov
%>
<%page args="reg_context, stack_allowed = True"/>
<%docstring>
Sets multiple registers, taking any register dependencies into account
(i.e., given eax=1,ebx=eax, set ebx first).
Args:
reg_... |
; Hello World Program (Hello.asm)
.MODEL small
.STACK 100h
.386
.data
message BYTE "Hello, world!",0dh,0ah
.code
main PROC
mov ax,@data ; initialize DS
mov ds,ax
mov ah,40h ; write to file/device
mov bx,1 ; output handle
mov cx,SIZEOF message ; number of bytes
mov dx,OFFSET message ; addr ... |
; A028950: Minimal norm of n-dimensional, strictly odd, unimodular lattice.
; 0,1,1,1,1,1,1,1,1,1,1,1,2,1,2,2,2,2,2,2,2,2,2,3,3,2,3,3,3,3,3,3,4,3
mov $2,$0
mov $4,$0
lpb $4,1
lpb $0,1
trn $2,4
trn $3,$0
mov $0,0
add $0,$2
sub $4,$3
mov $3,2
sub $4,2
lpe
add $1,1
trn $4,5
lpe
|
frame 1, 06
frame 2, 12
frame 1, 08
frame 2, 16
setrepeat 3
frame 3, 06
frame 0, 06
dorepeat 5
endanim
|
; A152893: Periodic sequence [3, 3, 0, 0, 4] of period 5
; 3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4,3,3,0,0,4
mod $0,5
mov $1,5
mov $2,6
mov $3,1
mov $4,$0
lpb $0
mov $0,1
mul $2,2
div $2,$1
mov $6,3
sub $6,$3
add $6,$2
mov $2,$6
div $4,2
add $4,1
mo... |
;;*****************************************************************************************
;; Origially based an example in the zip file found at https://www.chibiakumas.com/z80/
;;*****************************************************************************************
Cursor_ProcessDirections: ;We're going to pr... |
.data
textCh: .asciiz "Choose your set:\n1. Julia\n2. Mandelbrot\nChoice: "
text0: .asciiz "Enter number of iterations: "
text1: .asciiz "Enter in format: 0.0000\nEnter xc: 0."
text2: .asciiz "Enter yc: 0."
text3: .asciiz "Enter xn: 0."
text4: .asciiz "Enter yn: 0."
text5: .asciiz "\nFinished, result saved ... |
dc.w word_21250-Map_SurfboardSplash
dc.w word_2125E-Map_SurfboardSplash
dc.w word_2126C-Map_SurfboardSplash
dc.w word_2127A-Map_SurfboardSplash
dc.w word_21288-Map_SurfboardSplash
dc.w word_21296-Map_SurfboardSplash
dc.w word_212A4-Map_SurfboardSplash
word_21250: dc.w 2
dc.b $F0, 9, 0, 0, 0, ... |
; display test
PUSH 65
MOV OCH BX
loop:
POP AX
MOV AX [BX]
INC AX
INC BX
INC BX
PUSH AX
CMP AX 91
JIF loop
HLT
|
; Author: Robert Catalin Raducioiu (rbct)
global _start
section .text
_start:
; SYSCALLS for Linux x86:
; /usr/include/i386-linux-gnu/asm/unistd_32.h
; or https://web.archive.org/web/20160214193152/http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html
; sys_socketcall
xor eax, eax
... |
macro tile_object_type1(i, x, y, s) ; oid < $F8
; xxxx_xxss yyyy_yySS iiii_iiii (size ssSS)
db ((<x><<2)|(<s>>>2)), ((<y><<2)|(<s>&$3)), <i>
endmacro
macro tile_object_type2(i, x, y) ; oid in [$100,$13F]
; 1111_11xx xxxx_yyyy yyii_iiii (oid 1_00ii_iiii)
db ($FC|(<x>>>4)), (((<x>&$F)<<4)|(<y>>>2)),... |
[bits 32]
SetupIdentityPaging:
mov edi, PageTableEntry
mov cr3, edi
xor eax, eax
mov ecx, 0x1000
rep stosd
mov edi, cr3
mov dword [edi], 0x2003
add edi, 0x1000
mov dword [edi], 0x3003
add edi, 0x1000
mov dword [edi], 0x4003
add edi, 0x1000
mov ebx, 0x000... |
; WARNING: do not edit!
; Generated from openssl/crypto/aes/asm/aesni-x86.pl
;
; Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
;
; Licensed under the OpenSSL license (the "License"). You may not use
; this file except in compliance with the License. You can obtain a copy
; in the file L... |
; ---------------------------------------------------------------------------
; Object 4A - special stage entry from beta
; ---------------------------------------------------------------------------
VanishSonic:
moveq #0,d0
move.b obRoutine(a0),d0
move.w Van_Index(pc,d0.w),d1
jmp Van_Index(pc,d1.w)
; ========... |
font:
.26h:
db 00000000b
db 00000000b
db 00000000b
db 00111000b
db 01000100b
db 01000100b
db 00111000b
db 01000101b
db 10000010b
db 10000010b
db 10000010b
db 01000101b
db 00111001b
db 00000000b
db 00000000b
... |
; to store ABH in mem location 0000H, transfer the data to register B. Then transfer the data to location 0002H
LXI H, 0000H ; to initialize the HL pair by the 0000H
MVI M, 0ABH ; to store 0ABH in the memory location
MOV B, M ; to move the memory contents to Reg B
LXI H, 0002H
MOV M, B
HLT
|
;
;
; int get_psg(int reg);
;
; Get a PSG register.
;
;
SECTION code_clib
PUBLIC get_psg
PUBLIC _get_psg
get_psg:
_get_psg:
ld a,l
out ($15),a
in a,($14)
ld l,a
ret
|
section .bss
buffer resb 512
section .data
dMay1: db 64,64,64,64,64,64,64,64
dMay2: db 94,94,94,94,94,94,94,94
dMin1: db 96,96,96,96,96,96,96,96
dMin2: db 123,123,123,123,123,123,123,123
d0: db 32,32,32,32,32,32,32,32
compa: db 'l'
text db "Too much arguments, try again...", 0
textlen equ $ - text
section .text
glo... |
global WinMain
extern ExitProcess ; external functions in system libraries
extern MessageBoxA
section .data
title: db 'Win64', 0
msg: db 'Hello world!', 0
section .text
WinMain:
sub rsp, 28h
mov rcx, 0 ; hWnd = HWND_DESKTOP
lea rdx,[msg] ; LPCSTR lpText
lea r8,[title] ; LPCSTR lpCa... |
; A144478: Period 9: repeat 1,0,5,7,6,2,4,3,8.
; 1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8,1,0,5,7,6,2,4,3,8
mov $2,1
mov $3,$0
mov $0,2
mov $4,$3
mul $3,2
add $4,$3
mov $5,1
lpb $0,1
sub $4,$2
mov $2,$0
sub $0,1
mul $5,$4
lpe
mod $5,27
add $0,$5
mov $1,$0
div $1... |
user/_zombie: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <main>:
#include "kernel/stat.h"
#include "user/user.h"
int
main(void)
{
0: 1141 addi sp,sp,-16
2: e406 sd ra,8(sp)
4: e022 sd s0,0(sp)
6: 0800 ... |
GLOBAL zeroDiv
GLOBAL opCode
section .text
zeroDiv:
mov rcx, 0
div rcx
ret
opCode:
ud2
ret |
; CRT0 for the ZX81
;
; Stefano Bodrato Apr. 2000
;
; If an error occurs (eg. out if screen) we just drop back to BASIC
;
; ZX81 will be thrown in FAST mode by default.
; The "startup=2" parameter forces the SLOW mode.
; Values for "startup" from 3 to 6 activate the HRG modes
;
; - - - - -... |
; write 'Hello world!' to TTY
org 9000h
push bx
push si
mov bh,0 ; page 0
mov bl,0f1h ; light gray on black
mov si,hello
.next:
mov al,[si]
cmp al,0
je .done
mov ah,0eh
int 10h
inc si
jmp .next
.done:
pop si
pop bx
ret
hello: db 'Hello world!', 0
|
title ullrem - unsigned long remainder routine
;***
;ullrem.asm - unsigned long remainder routine
;
; Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
;
;Purpose:
; defines the unsigned long remainder routine
; __aullrem
;
;Revision History:
; 11-29-83 DFW initial version
; 06-01-8... |
segment .text
[global OpHLT]
[global OpCLI]
[global OpSTI]
[global OpSTIHLT]
[global OpIn8]
[global OpIn16]
[global OpIn32]
[global OpOut8]
[global OpOut16]
[global OpOut32]
[global LoadEFlags]
[global StoreEFlags]
[global LoadGDTR]
[global LoadIDTR]
; void OpHlt(void);
OpHLT:
hlt
ret
; void OpCLI(void)
OpCLI:
... |
;Hook to c function to drop our collectible for beehives
;put actor in a0
;put current params into a1.
obj_comb_hook:
or a1, a2, r0
jal obj_comb_drop_collectible
or a0, r0, a3 ; copy actor point from a3 to a0.
lw ra, 0x0014(sp)
jr ra
addiu sp, sp, 0x20 |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: prefEC.asm
AUTHOR: Chris Boyke
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- ------... |
; void PSGPlayNoRepeat(void *song)
SECTION code_clib
SECTION code_PSGlib
PUBLIC _PSGPlayNoRepeat
EXTERN asm_PSGlib_PlayNoRepeat
_PSGPlayNoRepeat:
pop af
pop hl
push hl
push af
jp asm_PSGlib_PlayNoRepeat
|
newline equs "\n"
def x = 1 newline def y = 2
println "x={d:x}, y={d:y}"
; the lexer is already in normal mode at the `AF`, so `newline` gets expanded
def m = AF newline def n = 2
println "n={d:n}"
; the lexer is in raw mode at the `AF`, but the parser resets it to normal
def AF = 1 newline def q = 2
println "q={d:q... |
;Assume that pin 3.3 (INT1) is connected to a pulse generator, write a program in which the
;falling edge of the pulse will send a high to P1.3, which is connected to a buzzer. In other words,
;the buzzer is turned on and off at the same rate as the pulses are applied to the INT1 pin.
ORG 000H
LJMP MAIN
ORG 013H
... |
;Prog20 Keypad to Display
;Use Update Freq. =1
;Use KeyPad no formato "Radio"
CLR P3.3
CLR P3.4
LOOP: MOV P0, #0F7h
CALL LER
CALL DISP
MOV P0, #0FBh
CALL LER
CALL DISP
MOV P0, #0FDh
CALL LER
CALL DISP
MOV P0, #0FEh
CALL LER
CALL DISP
SJMP LOOP
LER: MOV R7, #00h
MOV D... |
SECTION .text
global invert
invert:
mov rcx, rsi ; rcx = items to invert
test rcx, rcx
jz .exit ; array is empty
test rdi, rdi
je .exit ; null pointer to array
.loop:
neg dword [rdi+rcx*4-4]
loop .loop
.exit:
ret
|
// Test enum.inc
include "../../../src/common/assert.inc"
include "../../../src/common/struct.inc"
namespace point {
struct()
struct_maxsize(12)
field(xPos, 2)
field(yPos, 2)
endstruct()
}
assert(point.xPos == 0)
assert(point.yPos == 2)
assert(point.size == 4)
namespace test {
struct()
... |
; Program 10.5
; SYSENTER - Linux (NASM 32-bit)
; Copyright (c) 2017 Hall & Slonka
section .data
output: DB "Computer Architecture",0Ah
len: EQU ($ - output)
section .text
global _main
_main:
mov ebx, 1
mov ecx, output
mov edx, len
mov eax, 4
push sysenter_ret
push ecx
push edx
push ebp
mov ... |
%ifndef REBOOT
%define REBOOT
reboot: ;sends program to the end of memory which should cause a reboot
db 0x0ea
dw 0x0000
dw 0xffff
ret
%endif |
;;
;; WCRT - Win32API CRT
;;
;; math sinf
;;
;; Copyright (c) 2003-2004 by Joergen Ibsen / Jibz
;; All Rights Reserved
;;
;; http://www.ibsensoftware.com/
;;
;; This software is provided 'as-is', without any express
;; or implied warranty. In no event will the authors be
;; held liable for any damages arising from t... |
// RST
0x78
0x20 0x79 0x49
0xa9 0x10
0x8d 0x06 0x49
0x58
// L_MAIN_LOOP
0xea
0x4c 0x2a 0x49
// L_IRQ
ad 03 49
c9 01
f0 0b
c9 06
f0 0d
c9 08
f0 0f
4c 52 49
// L_IRQ_KEYDOWM
20 83 49
4c 52 49
// L_IRQ_CLOCK
20 d4 49
4c 52 49
// L_IRQ_TIMER
... |
EXTERN pixeladdress
INCLUDE "graphics/grafix.inc"
EXTERN __MODE2_attr
; Generic code to handle the pixel commands
; Define NEEDxxx before including
ld a,h
cp 128
ret nc
ld a,l
cp 192
ret nc
push bc ;Save callers value
call pixeladdress ;hl = address, a = pixel number
ld b,a
ld a,(__MODE2_attr)
rlca
... |
//2K19/EE/009 Abhik Kumar
// Find whether no is odd or even?
LDA 1001H // Load number to memory
RAR // Checking
JC LOOP // Condition
MVI A, 00H // Move Immediate For even
STA 1002H // store the accumulator value at address
HLT // Stop for even number
LOOP: MVI A, 01H // Move Immediate For odd
STA 1002H // store... |
; SBAS_CLRFRP - Clear FOR and REPeat loops in Command Line 1994 Tony Tebby
section sbas
xdef sb_clrfrp
xref sb_clrval
xref sb_setvar
include 'dev8_keys_sbasic'
include 'dev8_mac_assert'
;+++
; SBASIC - Clear FOR and REPeat loops in command line
;
; d0/d1/d2/d3/a0/a1/a3/a4 smashed
; a6 c p pointer to Sup... |
; int fzx_puts_callee(struct fzx_state *fs, char *s)
SECTION code_font
SECTION code_font_fzx
PUBLIC _fzx_puts_callee, l0_fzx_puts_callee
EXTERN l_neg_hl, asm_fzx_puts
_fzx_puts_callee:
pop af
pop hl
pop de
push af
l0_fzx_puts_callee:
push hl
ex (sp),ix
call asm_fzx_puts
pop ix
... |
NOP
LD 00000111 ; A
MOV r1 r0
LD 00001000 ; B
OR ; r0 = r1 or r0 = 0x0f
LD 11111111 ; A
MOV r1 r0
LD 11111111 ; B
OR ; r0 = r1 or r0 = 0xff
LD 10101010 ; A
MOV r1 r0
LD 10011100 ; B
OR ; r0 = r1 or r0 = 0xbe
NOP
NOP
NOP
|
.data
.text
addi $s0, $zero, 4
sll $t0, $s0, 2 # t0 = s0 << 2
li $v0, 1
add $a0, $zero, $t0
syscall
|
SECTION "Overflow", ROM0
ds $6000
LOAD "oops",WRAM0
; We might get an error for "oops", but it can also make sense to no-op the directive
ds $2001
; We shouldn't get any more errors for "Overflow" nor "oops"
db
ENDL
SECTION "Moar overflow", ROM0
ds $6001
LOAD "hmm", WRAM0
ds $2000
; Since the `ds` overflows "M... |
%include "../UltimaPatcher.asm"
%include "include/uw2.asm"
%include "include/uw2-eop.asm"
[bits 16]
defineAddress 108, 0x1036, jumpOverSubtitles
startPatch EXE_LENGTH, \
show subtitles in cut-scenes even if speech is played
; replace a jmp over displaying subtitles with nop's
startBlockAt addr_jumpOverSubtitl... |
; ECE 291 Spring 2004 MP4
; -- Gravity Blocks --
;
; Completed By:
; Your Name
;
; Zbigniew Kalbarczyk
; Guest Author - Ryan Chmiel
; University of Illinois Urbana Champaign
; Dept. of Electrical & Computer Engineering
;
; Ver 1.0
%include "lib291.inc"
%include "libmp4.inc"
BITS 32
GLOBAL _main
; Define Cont... |
// Example of inline ASM where a JMP is erronously culled during compilation
// https://gitlab.com/camelot/kickc/issues/302
// Commodore 64 PRG executable file
.file [name="asm-culling-jmp.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segment... |
; Test case: check code annotations work
symbol: equ 1
IFDEF symbol
ld b,1 ; mdl:no-opt
ld c,2
ELSE
ld b,3
ld c,4
ENDIF
ld (symbol),bc
end:
jp end
|
;;
;
; Name: stager_sock_reverse
; Qualities: Can Have Nulls
; Version: $Revision: 1512 $
; License:
;
; This file is part of the Metasploit Exploit Framework
; and is subject to the same licenses and copyrights as
; the rest of this package.
;
; Description:
;
; ... |
; Half-Triangle Rendered with Bare-Minimum Loops — TRIA.asm
; Copyright (c) 2021 Janrey Licas
; This code is licensed under MIT license. (see LICENSE for details)
.MODEL TINY
.CODE
MOV AH, 02H ; Syscall to Display Character through Terminal Stream.
__TRIA_ITER: ; ! Iterator, CH for nth Row Itera... |
; ===============================================================
; Jan 2014
; ===============================================================
;
; void *p_list_push_front(p_list_t *list, void *item)
;
; Add item to the front of the list.
;
; ===============================================================
SECTION cod... |
.model tiny
.486p
.data
rom_msg db 10,13,'Rom bios date: '
rom db 8 dup(?),'$'
.code
.startup
mov ax, ds
mov es, ax
mov ax, 0F000h
mov ds, ax
mov si, 0FFF5h
mov di, offset rom
cld
mov cx,2
rep movsd
mov ax, es
mov ds, ax
mov dx, offset rom_msg
mov ah, 09h
int 21h
mov ah, 0c0h
int 15h
jc @@ex
mov ax, es
mov ds,... |
INCLUDE "clib_cfg.asm"
SECTION code_driver
SECTION code_driver_character_input
PUBLIC cpm_00_input_reader_ichar_msg_getc
EXTERN __CPM_RRDR
EXTERN asm_cpm_bdos_alt, error_mc
cpm_00_input_reader_ichar_msg_getc:
; enter : ix = & FDSTRUCT.JP
;
; exit : a = keyboard char after character set translation... |
;;
;; Copyright (c) 2012-2020, Intel Corporation
;;
;; 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 of conditions and... |
; ---------------------------------------------------------------------------
; Object 2C - Jaws enemy (LZ)
; ---------------------------------------------------------------------------
Jaws:
moveq #0,d0
move.b obRoutine(a0),d0
move.w Jaws_Index(pc,d0.w),d1
jmp Jaws_Index(pc,d1.w)
; ===========================... |
; VirtualDub - Video processing and capture application
; Graphics support library
; Copyright (C) 1998-2004 Avery Lee
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of... |
; wa_stack_t *wa_stack_init(void *p, void *data, size_t capacity)
SECTION code_clib
SECTION code_adt_wa_stack
PUBLIC _wa_stack_init
EXTERN _w_array_init
defc _wa_stack_init = _w_array_init
|
Route10_Object:
db $2c ; border block
def_warps
warp 11, 19, 0, ROCK_TUNNEL_POKECENTER
warp 8, 17, 0, ROCK_TUNNEL_1F
warp 8, 53, 2, ROCK_TUNNEL_1F
warp 6, 39, 0, POWER_PLANT
def_signs
sign 7, 19, 7 ; Route10Text7
sign 12, 19, 8 ; PokeCenterSignText
sign 9, 55, 9 ; Route10Text9
sign 5, 41, 10 ; Route1... |
# Property of Mitchell Jonker
.data
prompt: .asciiz "Welcome to the BMI calculator!\n"
weight: .asciiz "Enter the weight (in pounds).\n"
height: .asciiz "Enter the height (in feet).\n"
underw: .asciiz "BMI Index is Underweight.\n\n"
normalw: .asciiz "BMI Index is Normal.\n\n"
overw: .asciiz "BMI Index is Overwei... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.