content stringlengths 23 1.05M |
|---|
; included file not defined
;#include
; included file empty
;#include ""
; included file does not exist
;#include "ff.asm"
; add_symbol multiple definitions test
;.const_A DAT 0x1000
;.const_A DAT 0x2000
; redaclaration of variables in a different file
;#include "asm_test_data.asm"
; redeclaration of variables in... |
;********************************************************************************************************
; uC/OS-III
; The Real-Time Kernel
;
; Copyright 2009-2021 Silicon Laboratories Inc. www.silabs.com
;
; ... |
; Dado un archivo en formato texto que contiene informacion sobre autos llamado listado.txt
; donde cada linea del archivo representa un registro de informacion de un auto con los campos:
; marca: 10 caracteres
; modelo: 15 caracteres
; año de fabricacion: 4 caracteres
; patente: 7 caracteres
; p... |
_CeladonMart3Text2::
text "Captured #MON"
line "are registered"
cont "with an ID No."
cont "and OT, the name"
cont "of the Original"
cont "Trainer that"
cont "caught it!"
done
_CeladonMart3Text3::
text "All right!"
para "My buddy's going"
line "to trade me his"
cont "KANGASKHAN for my"
cont "GRAVELER!"
... |
include irvine16.inc
.data
message db "RC car control",0
.code
main PROC
mov ax,@data
mov ds,ax
mov es,ax
mov cx,1
push cx ; stores value of cx in stack
stop:
mov ah,0
mov ax,0600h ; service for creating a block which can have text in it
mov bh,(red shl 4) OR blue ; r... |
; bv_stack_t *bv_stack_init(void *p, size_t capacity, size_t max_size)
SECTION code_clib
SECTION code_adt_bv_stack
PUBLIC bv_stack_init_callee
EXTERN b_vector_init_callee
defc bv_stack_init_callee = b_vector_init_callee
|
# $a0 = array base address
# $a1 = n
# $s0 = n!
Main:
addi $a0, $0, 0x100 # array base address = 0x100
addi $a1, $0, 0 # i = 0
addi $t0, $0, 3 # store 3 for use in for loop
addi $t1, $0, 50 # $t1 = 50
CreateArray_Loop:
slt $t2, $a1, $t1 # i < 50?
beq $t2, $0, Exit_Loop # if not then exit loop... |
dc.l $00000000
dc.l $00000003
dc.l $00000022
dc.l $00003020
dc.l $00023024
dc.l $00020044
dc.l $00040242
dc.l $00242442
dc.l $00244223
dc.l $02442231
dc.l $02422351
dc.l $04423151
dc.l $04423111
dc.l $00242311
dc.l $00242233
dc.l $00004422
dc.l $010... |
SECTION bss_clib
PUBLIC __i64_acc
PUBLIC __i64_extra
; Arranged this way so that division ends up with divisor in __i64_acc and
; dividend copied into __i64_extra
__i64_extra: defs 8
__i64_acc: defs 8
|
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
include bambi.inc
public initialize_cache
public halt_cache
;
; data from rdata.asm
;
extrn XMShandlevalid :byte
extrn XMShandle :word
extrn cache... |
.code
pal_execute_out_16 proc
mov rax, rdx;
mov rdx, rcx;
out dx, ax;
ret;
pal_execute_out_16 endp
end
|
; Copyright (c) 2005-2020 Intel Corporation
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed ... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.24.28117.0
TITLE C:\Users\libit\source\repos\L032\L032\L032.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
CONST SEGMENT
$SG5557 DB 'Hello World!', 0aH, 00H
ORG $+2
$SG5558 DB '%f', 0aH, 00H
CONST ENDS
PU... |
# Transform the following C operation to MIPS Assembly
# f = (g + h) - (i + j)
main:
# Read A
li $v0, 5 # load syscall read_int into $v0
syscall # make the syscall
move $t0, $v0 # move the number read into $t0
# Read B
li $v0, 5
syscall
move... |
[bits 64]
exit_process equ 0x0210
section .text
mov eax,0x1000
syscall
mov eax,exit_process
xor rdx,rdx
syscall |
todo: vereinfachung/zusammenfassung
hex->bcd wäre besser :-)
;subroutine (add a 6 on High and Low Bit, neccessary to get DEC instead of Hex)
AddOneToY:
ldi A,1
add YL,A ; YL = YL +1
in A,SREG ; save status
push A
CheckLL:
ldi A,0x0F
and A,YL ; now A has only the lower 4 bit (L)
cpi A,0x0A ; is A=10 ?
br... |
section .bss
digit_space resb 100
digit_space_pos resb 8
section .text
global _start
;123 / 10 = 12 remainder 3
; store 3
;12 / 10 = 1 R 2
; store 2
;1 / 10 = 0 R 1
; store 1
_start:
mov rax, 123
call _print_rax
mov rax, 60
mov rdi, 0
syscall
_print_rax:
mov rcx, digit_space
mov rdx, 10
mov [rcx], rbx
... |
[absolute 0f0000000h]
foo: resb 1
[section .data]
bar dd foo
baz db (foo>>24)
|
; most of the devices don't actually make any major difference to LR35902 mode
; like ZX48 or ZX128, doesn't matter too much
; (especially if programmer knows what is he doing)
; ZX Spectrum Next device is kinda different, it does also init Z80N instructions,
; thus selecting ZX Spectrum Next devic... |
;******************************************************************************
;* x86-optimized functions for the CFHD decoder
;* Copyright (c) 2020 Paul B Mahol
;*
;* This file is part of FFmpeg.
;*
;* FFmpeg is free software; you can redistribute it and/or
;* modify it under the terms of the GNU Lesser General Publi... |
BITS 64
default rel
global main
%include "defines.asm"
section .text
main: mov ecx, CODE_LEN
mov rax, KEY32
base: lea rbx, [rel $ + code - base]
loop: ror rax, 57
mov dh, [rbx]
xor dh, al
mov [rbx], dh
inc rbx
loop loop
%include "code.asm"
|
include "include/hUGE.inc"
SECTION "Song Game Over", ROMX
song_game_over::
db 6
dw order_cnt
dw order1, order2, order3, order4
dw duty_instruments, wave_instruments, noise_instruments
dw routines
dw waves
order_cnt: db 6
order1: dw P0c,P30,P70
order2: dw P1,P31,P31
order3: dw P0c,P0c,P0c
order4: dw P... |
; this is trivial "does it even do something" check of SAVECPCSNA with a CPC464 device
; there's nothing to verify after the test except sjasmplus did not error out
DEVICE AMSTRADCPC464
ORG 0x1200
start:
ld b,$7F
ld c,$8D ; disable ROMS, set mode 1
out (c),c
ld c,$10 ... |
section .data
msg1 : db 'Enter the value of x: ',10
l1 : equ $-msg1
msg2 : db 'e^x value by calc: ',10
l2 : equ $-msg2
formate1 : db "%lf",0
formate2 : db "%lf",10
section .bss
x : resq 1
temp : resq 1
ans : resq 1
i : resd 1
n : resd 1
section .text
global main
extern scanf
extern printf
main:
... |
; TGBL pictures routines
; Add picture
; Args: picture name, picture file (in quotes)
%macro tgblm_addPicture 2
%1:
incbin %2
%endmacro
; Draw picture
; Args: picture name, upper row, left column
; Spoils: AX, CX, DX, SI, DI
%macro tgblm_drawPicture 3
mov si, %1
mov di, ((%2) * vramWidth) + ((%3) * 2)
call tgbl... |
db "BLAZE@" ; species name
db "It can clear a"
next "30-story building"
next "in a single leap."
page "BLAZIKEN's punches"
next "will blacken its"
next "fiercest foes.@"
|
BattleCommand_Mimic:
; mimic
call ClearLastMove
call BattleCommand_MoveDelay
ld a, [wAttackMissed]
and a
jr nz, .fail
ld hl, wBattleMonMoves
ldh a, [hBattleTurn]
and a
jr z, .player_turn
ld hl, wEnemyMonMoves
.player_turn
call CheckHiddenOpponent
jr nz, .fail
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
call ... |
/*
* Serial Library Test Code Project
*
* org: 12/14/2014
* auth: Nels "Chip" Pearson
*
* Target: Tank Bot Demo Board, 20MHz, ATmega164P
*
*
*/
.nolist
.include "m164pdef.inc"
.list
.CSEG
.ORG $0000
rjmp RESET
.ORG $0002
rjmp trap_intr
.ORG $0004
rjmp trap_intr
.ORG $0006
rjmp trap_intr
.ORG $0008
rjm... |
; --------------IDENTITY MATRIX----------------
; THIS PROGRAM GET A ONE DIGIT NUMBER FROM USER AND MAKE A N * N IDENTITY MATRIX.
.MODEL SMALL
.DATA
INPUT DB ? ; CONTAIN INPUT NUMBER
COUNTER DB 00H ; USING FOR PRINT 1's
ROW_COUNTER DB 00H ; COUNT THE NUMBER OF ROWS PRINTED SO FAR.
MSG1 DB... |
frame 1, 07
frame 2, 25
frame 3, 35
frame 1, 07
frame 2, 25
setrepeat 2
frame 0, 06
frame 1, 06
dorepeat 6
endanim
|
ifndef INCLUDE_RAYCAST
INCLUDE_RAYCAST equ 1
; _
; | |
; _ __ __ _ _ _ ___ __ _ ___| |_
;| '__/ _` | | | |/ __/ _` / __| __|
;| | | (_| | |_| | (_| (_| \__ \ |_
;|_| \__,_|\__, |\___\__,_|___/\__|
; __/ |
; |___/
cast_x defb 0
cas... |
; Substitute for 'sub hl, de' instruction
; CPU Min T Max T
; 8080 86 86
; 8085 82 82
; gbz80 80 80
; r2ka 53 53
; z180 77 77
; z80 80 80
; z80n 80 80
SECTION code_l_sccz80
PUBLIC __z80asm__sub_hl_hl
__z80asm__sub_hl_hl:
push de
ld d, a
l... |
%ifidn __OUTPUT_FORMAT__,obj
section code use32 class=code align=64
%elifidn __OUTPUT_FORMAT__,win32
$@feat.00 equ 1
section .text code align=64
%else
section .text code
%endif
extern _DES_SPtrans
global _fcrypt_body
align 16
_fcrypt_body:
L$_fcrypt_body_begin:
push ebp
push ebx
push esi
push edi
... |
assume cs:code, ds:data
data segment
db 'Welcome to masm!'
db 16 dup (0)
data ends
code segment
start: mov ax, data
mov ds, ax
mov si, 0
mov es, ax
mov di, 16
mov cx, 16
cld
rep movsb
mov ax, 4c00h
int 21h
code ends
end start
|
[BITS 16]
[ORG 0x7C00]
MOVE SI, helloString
CALL PrintString
JMP $
Printcharacter:
MOV AH,0x0E
MOV BH,0x00
MOV BL,0x07
INT 0x10
RET
PrintString:
next_character:
MOV AL,[SI]
INC SI
OR AL,AL
JZ exit_function
CALL Printcharacter
JMP next_character
exit_function:
RET
helloString: db 'Hello World!',0
TIMES 510 - ($-$$... |
; int in_key_pressed(uint16_t scancode)
SECTION code_clib
SECTION code_input
PUBLIC in_key_pressed
EXTERN asm_in_key_pressed
defc in_key_pressed = asm_in_key_pressed
|
; test externals: public segment of same name in two modules
IDEAL
ASSUME CS:IMAGE, DS:IMAGE, ES:IMAGE, SS:IMAGE
SEGMENT SEG1 PUBLIC
ORG 100h
start:
int 20h
_XBYTE db 0
_XWORD dw 0
_XCODE:
int 20h
ENDS
PUBLIC _XBYTE, _XWORD, _XCODE
GROUP IMAGE SEG1
END start
|
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC sms_01_output_terminal_oterm_msg_printc
EXTERN __IO_VDP_DATA
EXTERN asm_sms_vram_write_de
sms_01_output_terminal_oterm_msg_printc:
; enter : c = ascii code
; l = absolute x coordinate
; h = absolute y coordinate
;... |
assume cs:code, ss:stack, ds:data
include io.inc
include debug.inc
include malloc.inc
include list.inc
stack segment stack
dw 03fh dup(?)
stack ends
data segment
msg db 81 dup(?)
len db 0
prompt db 'please input a sentence ending with an enter:', 0
data ends
code segment
start proc far
mov bp... |
.386p
page 58,132
;******************************************************************************
title WINEMM
;******************************************************************************
;
; (C) Copyright MICROSOFT Corp. 1989-1991
; (C) Copyright COMPAQ Computer Corp. 1989-1991
;
; Title: EMM386.EXE - MIC... |
; nasm -f bin -o tinysh tinysh.asm
BITS 64
org 0x400000
ehdr: ; Elf64_Ehdr
db 0x7f, "ELF", 2, 1, 1, 0 ; e_ident
times 8 db 0
dw 2 ; e_type
dw 0x3e ; e_machine
dd 1 ; e_version
dq _start ; e_entry
dq phdr - $$ ; e_phoff
dq 0 ; e_shoff
dd 0 ; e_flags
... |
.code
addi $a0,$a0,10
test:
addi $v0,$zero,20
addi $v1,$zero,3
syscall
addi $t0,$zero,10
addi $v0,$zero,10
syscall
.data
11
12
13
14
15 |
// ********************************************************
// * [SMD] Castlevania Bloodlines *
// ********************************************************
// * Patch: Translation ASM Patch v1.0 *
// * Author: Hans Bonini (Anime_World) *
// *****************... |
;--------------------------------------------------
; State define
;--------------------------------------------------
; Load state data
Align 256
State_Ram:
.incbin "State/SMBOrigMap/Ram.bin"
Align 256
State_Oam:
.incbin "State/SMBOrigMap/Oam.bin"
State_Nametable:
Align 256
.incbin "State/SMBOrigMap/Nametable... |
DATA SEGMENT
STUD RECORD NUM:4,SEX:1,AGE:6,HOME:5
ARRAY STUD 30 DUP(< >)
COUNT DB 0
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: PUSH DS
MOV AX,0
PUSH AX
MOV AX,DATA
MOV DS,AX
MOV CH,30
MOV BX,OFFSET ARRAY
NEXT: MOV AX,[BX]
... |
.686
.XMM
.MODEL flat, c
ASSUME fs:_DATA
.CODE
; x64 for x86
EXTERN SW2_GetSyscallNumber: PROC
EXTERN internal_cleancall_wow64_gate: PROC
NtAccessCheck PROC
push ebp
mov ebp, esp
push 0C45B3507h ; Load function hash into ECX.
call SW2_GetSyscallNumber
lea esp, [esp+4]
mov ecx, 8h
push_argument:
de... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GlobalPC 1999 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Printer Drivers
FILE: jobStartCanonBJ.asm
AUTHOR: Joon Song, 9 Jan 1999
ROUTINES:
Name Description
---- -----------
PrintStartJob Setup ... |
_zombie: file format elf32-littlearm
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(void)
{
0: e92d4800 push {fp, lr}
4: e28db004 add fp, sp, #4
if(fork() > 0){
8: eb0000a8 bl 2b0 <fork>
c: e3500000 cmp r0, #0
10: da000005 ble 2c <main+0x2c>
... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1
TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\dict.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _xmlMalloc:DWORD
COMM _... |
Music_TitleScreen::
audio Music_TitleScreen, Ch0, Ch1, Ch2, Ch3
Music_Credits::
audio Music_Credits, Ch0, Ch1, Ch2
Music_HallOfFame::
audio Music_HallOfFame, Ch0, Ch1, Ch2
Music_OaksLab::
audio Music_OaksLab, Ch0, Ch1, Ch2
Music_JigglypuffSong::
audio Music_JigglypuffSong, Ch0, Ch1
Music_BikeRiding::
audio M... |
.data
nHdnCount dd 0 ; Hidden records counter (for delta)
.code
;; -------------------------------------------------------------------------------- ;;
NewRegEnumValue proc p1:dword, p2:dword, p3:dword, p4:dword, p5:dword, p6:dword, p7:dword, p8:dword
local RealRegEnumValue : dword
mov RealRegEnumValue, eax
; I... |
dc.l $00000000
dc.l $00000011
dc.l $00001122
dc.l $00012233
dc.l $00123345
dc.l $01234455
dc.l $12341111
dc.l $12115511
dc.l $11151151
dc.l $01151151
dc.l $13315511
dc.l $13441133
dc.l $01341341
dc.l $00134141
dc.l $00000000
dc.l $00000000
dc.l $000... |
global _start
section .text
_start:
mov al, 0xaa
add al, 0xaa
jb exit_ten
mov rax, 60
mov rdi, 0
syscall
exit_ten:
mov rax, 60
mov rdi, 10
syscall
section .data
|
; Tilesets indexes (see data/tilesets.asm)
const_def 1
const TILESET_SINNOH_1 ; 01 WEST SINNOH 1 (TWINLEAF, SANDGEM, JUBILIFE)
const TILESET_SINNOH_2 ; 02 WEST SINNOH 2 (OREBURGH, ETERNA)
const TILESET_PLAYERS_ROOM ; 03 TWINLEAF 2F
const TILESET_PLAYERS_HOUSE ; 04 TWINLEAF 1F... |
SECTION code_fcntl
PUBLIC asm_tty_state_get_3
EXTERN l_inc_hl, asm_tty_state_get_2
EXTERN asm0_tty_state_param_store
asm_tty_state_get_3:
; c = ascii char
; stack = & tty.action
; first store next state
pop hl
ld de,asm_tty_state_get_2
call asm0_tty_state_param_store
; hl = & ... |
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC cpm_00_output_cons_ochar_msg_putc
EXTERN __CPM_WCON
EXTERN asm_cpm_bdos_alt
cpm_00_output_cons_ochar_msg_putc:
; enter : c = char
; exit : carry set if error
; can use : af, bc, de, hl, af'
ld e,c
ld c,__CPM_WCON
call... |
; draws the icicle array to the screen
draw_icicles:
ldx #0
draw_icicles_loop:
stx $89
lda icicle_frame, x ; Check if frame is < 0
bmi .1 ; Skip if < 0
jsr draw_icicle ; If frame >= 0, we should erase it before drawing the next one
.1:
ldx $89 ; Save X since it gets overwritten in some subrout... |
; -------------------------------------------------------------
;
; InvokeFuncAsm - Invokes a function through a function pointer passed as
; the first argument. All other parameters are forwarded on, plus the return
; value of the function invoked is returned.
;
; Copyright (c) Richard Birkby, ThunderMain ltd, N... |
SECTION header vstart=0
dd program_end ; 记录程序长度
dw start ; 程序入口的相对偏移
dd section.code.start ; 程序入口的绝对偏移
dw (header_end-code_segment)/4 ; 段重定位表长度
code_segment dd section.code.start ; 记录代码段位置
data_segment dd section.data.start ; 记录数据段位置
stack_segment dd section.stack.start ; 记录栈位置
header_end... |
UsedCut:
xor a
ld [wActionResultOrTookBattleTurn], a ; initialise to failure value
ld a, [wCurMapTileset]
and a ; OVERWORLD
jr z, .overworld
cp GYM
jr nz, .nothingToCut
ld a, [wTileInFrontOfPlayer]
cp $50 ; gym cut tree
jr nz, .nothingToCut
jr .canCut
.overworld
dec a
ld a, [wTileInFrontOfPlayer]
cp $3d ;... |
; Hello World em Assembly x86
; compile com o comando a baixo (precisa do build essentials no linux)
; voce pode instalar com apt-get install build-essential
; ld -m elf_i386 -s -o hello hello.o
section .text align=0
global _start
mensagem db 'Hello world', 0x0a ; espaço de memoria destinado a conter nossa me... |
# Register usage:
# r3 - used as scratch space to load each byte into.
# r4 - used to hold the sum.
# r5 - the address of the next byte to load.
# r6 - the location of the end of the main loop.
# r7 - used to hold the constant 10.
# r8 - used to hold the constant '0'.
# r9 - used to hold the constant '\n'.
lc ... |
; Generated by PSoC Designer 5.4.3191
;
;==========================================================================
; PSoCConfig.asm
; @PSOC_VERSION
;
; Version: 0.85
; Revised: June 22, 2004
; Copyright (c) Cypress Semiconductor 2015. All Rights Reserved.
;
; This file is generated by the Device Edito... |
[SECTION .s32]
BITS 32
call main
pop eax ;故意让返回地址出错造成异常保护中断
retf
api_putchar:
mov edx, 1
mov al, [esp + 4]
int 02Dh
ret
%include "app.asm" |
;; ----------------------------------------------------------------------------
;;
;; Copyright (c) Microsoft Corporation. All rights reserved.
;;
;; ----------------------------------------------------------------------------
include hal.inc
SYMFIX(?KdNotifyTrap@@YIXPAUKdDebugTrapData@@@Z) proc
... |
; by Ish.
; Public domain from https://ish.works/bootsector/bootsector.html
bits 16 ; tell NASM this is 16 bit code
org 0x7c00 ; tell NASM that our code will be loaded at offset 0x7c00
%define CURRENT_LEVEL 0x1000
%define CURRENT_LEVEL_4 0x1004
%define SCREEN_DS 0xb800
boot:
; clear screen (re-set text... |
SECTION "Input", ROM0
loadJoypad:
.copy
ld a, [joybuttons]
ld [joyhold], a
.upper
ld a, P1F_5
ld [rP1], a
ld a, [rP1]
ld a, [rP1]
cpl
and $0F
swap a
ld b, a
.lower
ld a, P1F_4
ld [rP1], a
ld a, [rP1]
ld a, [rP1]
ld a, [rP1]
ld a, [rP1]
ld a, [rP1]
ld a, [rP1]
cpl
and $0F
or a, b
.store
ld [joybut... |
; ---------------------
; THE 'SPARE' LOCATIONS
; ---------------------
;; spare
L386E: DEFB $FF, $FF ;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF... |
; Windows pwning module
; Boot Application of Stoned Bootkit
; Version 0.1 from 18.06.2009 11:12
; (C) 2009 Peter Kleissner
[bits 16] ; create a 16 Bit Code
CPU 386 ; Assemble instructions up to the 386 instruction set
%include "M... |
;/*!
; @file
;
; @ingroup fapi
;
; @brief Global vars of DOS wrappers
;
; (c) osFree Project 2021, <http://www.osFree.org>
; for licence see licence.txt in root directory, or project website
;
; This is Family API implementation for DOS, used with BIND tools
; to link required API
;
; @author Yuri Proku... |
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x0000000000000000", "0xFFFFFFFFFFFFFFFF"],
"XMM1": ["0x0000000000000000", "0x0000000000000000"],
"XMM2": ["0x0000000000000000", "0x0000000000000000"],
"XMM3": ["0x0000000000000000", "0xFFFFFFFFFFFFFFFF"],
"XMM4": ["0xFFFFFFFFFFFFFFFF", "0x00000000000000... |
SECTION bss_driver
PUBLIC aciaTxBuffer
PUBLIC aciaTxCount, aciaTxIn, aciaTxOut, aciaTxLock
EXTERN ACIA_TX_SIZE
aciaTxBuffer: defs $80 ;;ACIA_TX_SIZE ; Space for the Tx Buffer
aciaTxCount: defb 0 ; Space for Tx Buffer Management
aciaTxIn: defw aciaTxBuffer ; non-zero item in ... |
spi_extend_init:
push r16
push r17
; init RegA as outputs
ldi r17, 0x00
ldi r16, 0x00
rcall spi_send
;pull up some Breg pins
ldi r17, 0x0D
ldi r16, 0xFF ; only pull up GPB0
rcall spi_send
ldi r17, 0x14
ldi r16, 0x00 ; clear all Areg Leds
rcall spi_send
pop r17
pop r16
ret
setLEDs:
push r17
ldi r17... |
* Find pointer position V1.07 1985 Tony Tebby QJUMP
*
section driver
*
xdef pt_rptr
*
xref pt_pick
*
include dev8_keys_con
include dev8_keys_k
include dev8_keys_err
include dev8_keys_sys
include dev8_keys_chn
include dev8_keys_jcbq
include dev8_keys_qlv
include dev8_keys_qdos_pt
include 'dev8_mac_ass... |
;
; OSCA C Library
;
; ANSI Video handling
;
; CLS - Clear the screen
;
;
; Stefano Bodrato - June 2012
;
;
; $Id: f_ansi_cls.asm,v 1.2 2015/01/19 01:33:18 pauloscustodio Exp $
;
PUBLIC ansi_cls
INCLUDE "flos.def"
.ansi_cls
jp kjt_clear_screen
|
/*
* FreeRTOS Kernel V10.4.1
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, ... |
; Basic drag-and-drop interface for StarCraft: Brood War 1.16.1. Draws a dot every other space
; to simulate a transparent effect.
;
; Originally written on 2009/05/29 by attilathedud.
; System descriptors
.386
.model flat,stdcall
option casemap:none
VirtualAlloc proto stdcall :DWORD, :DWORD, :DWORD,... |
bits 64
default rel
extern printf
extern scanf
global main
section .data
format_in db '%s', 0
format_out db '%s', 10, 0
section .bss
input resb 1024
output resb 1024
section .text
main:
sub rsp, 8
; Read the incoming string
lea rsi, [input]
lea rdi, [format_in]
mov al, 0
call scanf wrt ..plt
; Copy ... |
Name: mouse.asm
Type: file
Size: 6884
Last-Modified: '1993-07-20T00:24:11Z'
SHA-1: 8001BF2DD95C5ED0A4A410F9DAEF1000722F0416
Description: null
|
;
; NES TV system detection code
; Copyright 2011 Damian Yerrick
;
; Copying and distribution of this file, with or without
; modification, are permitted in any medium without royalty provided
; the copyright notice and this notice are preserved in any source
; code copies. This file is offered as-is, without a... |
copyright zengfr site:http://github.com/zengfr/romhack
010338 clr.b ($4eb,A5) [base+4EA]
01033C rts
01040E tst.b ($4eb,A5)
010412 bne $10468
0104F0 clr.b ($4eb,A5) [base+4E8]
0104F4 rts
copyright zengfr site:http://github.com/zengfr/romhack
|
.386p
.387
include macroch.dat
assume cs:FLAT,ds:FLAT,es:FLAT,fs:FLAT,gs:FLAT,ss:FLAT
_TEXT segment para use32 public 'CODE'
include macroch.equ
ini_mach proc near
mov eax,3
mov ebx,offset FLAT:pnmac394
mov ecx,offset FLAT:dmc
mov edx,offset FLAT:zdmc
push z_dmc
call near ptr inisymb
mov ... |
; Calling Convention: https://speakerdeck.com/retrage/efi-byte-code-virtual-machine-for-fun-and-profit?slide=7
; https://sudonull.com/post/114032-Organizing-x86-procedure-calls-from-EFI-Byte-Code
; Example 1
;--- Subroutine: EBC/x86 gate for Read MSR ----------------------------------;
; Caller must verify x86 suppo... |
; Lunar Launcher
; (c) 2018 Michael Bayer
;
;
; TODO
;
processor 6502
include "vcs.h"
include "macro.h"
;----------------------------
; Constants
;----------------------------
; ntsc constants
VBLANK_WAIT = 42
PLAY_SCANLINES = 160
; Game constants
PLAYER_SPEED = 300 ; subpixel speed, div by 256 f... |
;坑爹的msvc longjmp的实现用了类似c++异常的方法,导致destructor在longjmp时会被调用,没办法只能自己实现一个了。
.386
.MODEL FLAT
.CODE
PUBLIC _popkcSetjmp
PUBLIC _popkcLongjmp
_popkcSetjmp PROC
mov ecx,[esp+4h]
mov [ecx],ebx
mov [ecx+4h],esi
mov [ecx+8h],edi
mov [ecx+0ch],ebp
lea edx,[esp+4h]
mov [ecx+10h],edx
mov edx,[esp]
mov [ecx+14h],edx... |
*****************************
* *
* TAPE VERIFY *
* *
* JAN 78 *
* BY WOZ *
* *
* *
*****************************
*
* TAPE VERIFY EQUATES
*
CHKSUM EQU $2E
A1 EQU $3C
HIMEM EQU $4C ;BASIC HIMEM POINTER
PP EQU $CA ;BASIC BEGIN OF PROGRAM
P... |
TITLE EOIND - Copyright (c) SLR Systems 1994
INCLUDE MACROS
INCLUDE IO_STRUC
PUBLIC END_OF_INDIRECT
.DATA
EXTERNDEF IND_DEVICE:DWORD
.CODE PHASE1_TEXT
EXTERNDEF RELEASE_IO_SEGMENT:PROC,_close_handle:proc
END_OF_INDIRECT PROC
;
;
;
PUSH EBX
XOR ECX,ECX
MOV EBX,IND_DEVICE
ASSUME EB... |
; void *wa_priority_queue_top(wa_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_wa_priority_queue
PUBLIC _wa_priority_queue_top
EXTERN asm_wa_priority_queue_top
_wa_priority_queue_top:
pop af
pop hl
push hl
push af
jp asm_wa_priority_queue_top
|
CeladonGym_h:
db GYM ; tileset
db CELADON_GYM_HEIGHT, CELADON_GYM_WIDTH ; dimensions (y, x)
dw CeladonGym_Blocks ; blocks
dw CeladonGym_TextPointers ; texts
dw CeladonGym_Script ; scripts
db 0 ; connections
dw CeladonGym_Object ; objects
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Geoworks 1994 -- All Rights Reserved
PROJECT: GeoDex
MODULE: Misc
FILE: miscBottomBWBitmapPizza.asm
AUTHOR: Greg Grisco, Jun 20, 1994
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisc... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT:
MODULE:
FILE: utilsResident.asm
AUTHOR: Adam de Boor, Jun 1, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Descr... |
ParalyzeEffect_:
ld hl, wEnemyMonStatus
ld de, wPlayerMoveType
ldh a, [hWhoseTurn]
and a
jp z, .next
ld hl, wBattleMonStatus
ld de, wEnemyMoveType
.next
ld a, [hl]
and a ; does the target already have a status ailment?
jr nz, .didntAffect
; check if the target is immune due to types
ld a, [de]
cp ELECTRIC
... |
.data 0x0
.text 0x0
start:
lui $28, 0xFFFF
ori $28, $28, 0xFC00
lw $t0, 0x70($28)
andi $v0, $t0, 0xFFF
srl $t0, $t0, 12
andi $t0, $t0, 0xF
lw $t1, 0x72($28)
sll $t1, $t1, 4
or $v1, $t0, $t1
addu $at, $v0, $v1
sw $at, 0x60($28)
srl $at, $at, 16
sw $at, 0x62($28)
j start |
INCLUDE "config_private.inc"
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC rc_01_output_acia_oterm_msg_bell
PUBLIC rc_01_output_acia_oterm_msg_bell_0
EXTERN rc_01_output_acia_oterm_msg_putc_send
rc_01_output_acia_oterm_msg_bell:
; can use: af, bc, de, hl
bit 0,(ix+7)
ret z ... |
[bits 64]
%define MJB_RBX 0
%define MJB_RBP 1
%define MJB_R12 2
%define MJB_R13 3
%define MJB_R14 4
%define MJB_R15 5
%define MJB_RSP 6
%define MJB_PC 7
%define MJB_SIZE (8*8)
EXPORT __mylongjmp
mov rbx, [... |
push 0;
push 0;
st;
push 0;
push 1;
st;
push 0;
push 0;
sethi 0x0200;
st;
push 0;
push 0;
push 0;
pull_cp 2;
push 10;
cmp_ugt;
bz 49;
drop 1;
push 0;
tuck 1;
pull_cp 2;
push 5;
cmp_ugt;
bz 4;
drop 0;
push 2;
j_pc 3;
drop 0;
push 1;
pull_cp 1;
pull_cp 1;
cmp_ugt;
bz 14;
push 0;
sethi 0x0200;
pull_cp 0;
ld;
push 1;
add;
... |
;;; average.asm
;;; Taken from the nasm tutorial https://cs.lmu.edu/~ray/notes/nasmtutorial/
; -----------------------------------------------------------------------------
; 64-bit program that treats all its command line arguments as integers and
; displays their average as a floating point number. This program use... |
TITLE Smallest summator
CODESG SEGMENT PARA 'CODE'
ASSUME CS:CODESG, DS:CODESG, ES:CODESG
ORG 100h
BEGIN:
MOV SI, (OFFSET chislo2)-1
MOV CL, maxlen+1
MOV BL, maxlen+1
MOV DH, 0B8h
MOV ES, DX
MOV DI, 0170h;0B40h
... |
copyright zengfr site:http://github.com/zengfr/romhack
003EB4 sub.w ($aa,A0), D0 [enemy+AF]
003EC6 cmpi.w #$f, D0 [enemy+AF]
copyright zengfr site:http://github.com/zengfr/romhack
|
; search a given char in string
Assume cs:code , ds:data , es:data
data segment
count equ 06h
str db 'VASAVI'
data ends
code segment
start:
mov ax,data
mov ds,ax
mov es,ax
mov di,offset str
mov cx , count
mov al,'A'
REPNE SCASB ; REPNE = repeat if not equal ; SCASB = 1)scaan 2)cmp with ax/al 3)de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.