content stringlengths 23 1.05M |
|---|
/*
* Copyright © <2010>, Intel Corporation.
*
* 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, including
* without limitation the rights to use, copy, modify, merg... |
BITS 32
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; CDQ
;TEST_BEGIN_RECORDING
MOV eax, 0x819EDB32
MOV edx, 0
cdq
;TEST_END_RECORDING
|
; unit test to provoke some BRAM borderline cases
; done by sy2002 on August, 22nd 2015
;
; the unit test executes correctly, if the TIL display is showing the
; following sequence of numbers having about 1 sec delay in between
; ABAB, CDCD, EFEF, ACDC, CCCC, ACDC, EFEF, CDCD, FFFF, .... (repeat)
.ORG ... |
db DEX_SKIPLOOM ; pokedex id
db 55 ; base hp
db 45 ; base attack
db 50 ; base defense
db 80 ; base speed
db 55 ; base special
db GRASS ; species type 1
db FLYING ; species type 2
db 120 ; catch rate
db 136 ; base exp yield
INCBIN "pic/ymon/skiploom.pic",0,1 ; 66, sprite dimensions
dw SkiploomPicFront
dw Ski... |
;
; Old School Computer Architecture - interfacing FLOS
; Stefano Bodrato, 2012
;
; void set_file_pointer(unsigned long pointer);
;
; Moves the read point from the start of a file (use after find file)
;
; Input Registers :
; IX:IY = Offset in bytes from start of file.
;
;
; $Id: set_file_pointer.asm,v 1.2 2012/03/08 0... |
!:
lda {c2}-1,y
sta {c1}-1,y
dey
bne !- |
;
; INT0_INTERRUPT.asm
;
; Created: 9/22/2021 3:44:16 PM
; Author : Harish
;
.CSEG
.ORG 0x000
RJMP RESET
.ORG 0x001
RJMP INT0_ISR
.ORG 0x010
RESET:
;Loading the Stack address into SP
LDI R16, HIGH(RAMEND)
OUT SPH, R16
LDI R16, LOW(RAMEND)
OUT SPL, R16
;Interface Port B Pin0 to ... |
;;; Example of 32-bit mode Mac OS nasm assembly, with stack alignment
;;; In the MacOS ABI, system functions such as _printf must be
;;; called with the stack aligned to a 16 byte boundary. Assuming
;;; that _main was called with 16-byte alignment, this works below
;;; because we push 12 bytes (EBP, EAX, mystring) an... |
ORG 0H;
LJMP MAIN;
MAIN:
MOV 60H, #81H;
MOV 61H, #7FH;
MOV A, 60H;
ADD A, 61H;
JB OV, WRONG;
SETB PSW.5;
SJMP HERE;
WRONG: CLR PSW.5;
MOV 62H, A;
HERE: SJMP HERE;
END; |
; vim:noet:sw=8:ts=8:sts=8:ai:syn=asm68k
include "68000app.inc"
; slowly fade the LED in and out to indicate we're ready
animate_led:
fadespeed equ 6
moveq #0,d1 ; duty cycle
moveq #fadespeed,d2 ; number of periods with given duty cycle
led... |
;-----------------------------------------------------------------------------
; sound.asm - the squirrel MML player, which can be used to control the psg
;-----------------------------------------------------------------------------
; modified mar 2010 by Micheal E. Ward.
; Copyright 2010 by M.E. Ward. All rights... |
// Test code
// first instruction is not executed
nop
// second instruction is executed twice
// Test jal for function calls
//
// jump and link has one cycle delay
// for target address in accu
//
start:
load <function
loadh >function // can be omitted for small programs
nop
jal r3
load 1
load 2
load 3
bran... |
%include "macros/patch.inc"
%include "macros/datatypes.inc"
%include "TiberianSun.inc"
%include "string_macros.inc"
cextern UsedSpawnsArray
;; @JMP 0x05DD9BB 0x005DD9C4 ; Call TeamTypes__Read_INI later
@LJMP 0x0044B0CF, _Get_HouseType_From_Index_Spawn_Fake
@LJMP 0x00628600, _TeamTypeClass__Read_INI_Fake_House_Name_Sk... |
object_const_def ; object_event constants
const ECRUTEAKITEMFINDERHOUSE_COOLTRAINER_M
const ECRUTEAKITEMFINDERHOUSE_POKEDEX
EcruteakItemfinderHouse_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
EcruteakItemfinderGuy:
faceplayer
opentext
checkevent EVENT_GOT_ITEMFINDER
iftrue .itemfinder
writetext Ecrut... |
;
; Copyright (c) 2014 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing proje... |
; QPC 16 bit sprite (mode 32) palette
;
; 2002-12-15 Added additional mode palettes (JG)
;
section driver
;
xdef pt_palsprite
xdef pt_pal16sprite
xdef pt_pal4sprite
xdef pt_pal2sprite
;
pt_palsprite
dc.w $0000,$0420,$0001,$0421,$0900,$0D20,$0901,$0D21
dc.w $0048,$0468,$0049,$0469,$0948,$0D68,$0949,$0D69
dc.w $... |
; Test.asm
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
wordVal SWORD -101 ; FF9Bh
.code
main proc
mov dx, 0
mov ax, wordVal ; DX:AX = 0000FF9Bh (+65, 435)
cwd
mov bx, 2 ; BX is the divisor
idiv bx ; divide DX : AX by BX (signed operation)
invoke ExitProcess,0
main... |
BITS 16
start:
mov ax, 07C0h ; Set up 4K stack space after this bootloader
add ax, 288 ; (4096 + 512) / 16 bytes per paragraph
mov ss, ax
mov sp, 4096
mov ax, 07C0h ; Set data segment to where we're loaded
mov ds, ax
mov si, text_string ; Put string position into SI
call print_string ; Call our string-p... |
; Buffering Initialisation
section iou
xdef iob_init
xref iob_schd
xref iou_idset
xref iou_idlk
include 'dev8_keys_iod'
;+++
; This routine sets up the scheduler linkage for the IO buffering routines
;
; a3 r pointer to IOB linkage
;---
iob_init
lea iob_link,a3 ; IO linkage definition
jsr iou_idset ; ... |
[W101UsV0]
moduleMatches = 0x2CEAD675
.origin = codecave #
_widthScaleRatio:
.float ($width/$height)
_Cave:
lis r7, _widthScaleRatio@ha
lfs f2, _widthScaleRatio@l(r7)
blr
#Aspect + object culling
0x036ACD60 = bla _Cave
0x036ACC68 = bla _Cave
0x036ACC6C = bla _Cave
0x036AC04C = bla _Cave
0x036AC048 = bla _Cav... |
bits 64
default rel
section .text
global pal_execute_invlpg
pal_execute_invlpg :
invlpg [rdi]
ret
|
MY_CODE SEGMENT
ASSUME CS:MY_CODE
PUBLIC mouse_iniciar, mouse_mostrar
PUBLIC mouse_ocultar, mouse_botones
mouse_iniciar PROC FAR
MOV AX, 0h
INT 33h
RET
mouse_iniciar ENDP
mouse_mostrar PROC FAR
... |
; ===========================================================================
; uz80as, an assembler for the Zilog Z80 and several other microprocessors.
;
; Intel 8008.
; ===========================================================================
#define equ .equ
#define end .end
n: equ 20h
nn: equ... |
TITLE OSTIMER - MS-DOS TIMER support
;***
; OSTIMER - MS-DOS TIMER Support
;
; Copyright <C> 1988, Microsoft Corporation
;
;Purpose:
;
; BASIC Syntax mapping to included runtime entry points:
;
;
; - TIMER Function:
;
; var = TIMER
; |
; B$TIMR
;
;******************************************************... |
'LET [0],AdrLow,AdrHigh:USR(#700,0):L=[2]:H=[3]
'peek
r0=8
r0=r0<<#8
r1=r1+r0
r0=[r1+#0] L
r0=[r0+#0] L
[r1+1]L=r0
ret
'[2]=L:[3]=H:LET [0],AdrLow,AdrHigh:USR(#70E,0)
'poke
r0=8
r0=r0<<#8
r1=r1+r0
r0=[r1+1] L
r1=[r1+0] L
[r1+0]L=r0
ret
|
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 ... |
;
.data
res12 dd 0
res12_1 dd 0
res12_2 dd 0
res12_3 dd 0
res7 dd 0
res7_1 dd 0
res7_2 dd 0
res7_3 dd 0
res2 dd 0
res2_1 dd 0
res2_2 dd 0
res2_3 dd 0
tmp dd 0
tmp_1 dd 0
tmp_2 dd 0
tmp_3 dd 0
.code
; !!! --- current function is only for one thread (distance_sse_v3) --- !!!
distance... |
; SMSQ Atari DV3 Main Routine
section header
xref smsq_end
xref.l dv3_vers
header_base
dc.l dv3_base-header_base ; length of header
dc.l 0 ; module length unknown
dc.l smsq_end-dv3_base ; loaded length
dc.l 0 ; checksum
dc.l 0 ; always select
dc.b 1 ; 1 level down
dc.b 0
dc.w smsq_name-*
sm... |
[org 0x7e00]
[bits 16]
; clear the screen and show the welcome message
call clear_screen
mov si, welcome_message
call print_si
main_loop:
; get the user input and analyze the command
mov si, prompt
call print_si
call get_input
call command_line_si
jmp main_loop
jmp $
NULL_TERMINATOR equ 255... |
;-----------------------------------------------
; VIteen OS v0.1 by Cedric Fauth
;-----------------------------------------------
; setting up directives for nasm
bits 16 ; only 16 bit support
org 0x0000 ; base adress in memory
jmp 0x7c0:entry ; far jump to entry (0x7c0 * 0x10 + entry)
... |
; DCL_PI_A1.asm - Series PI controller on C28x (fixed point) [r1.02]
;
; Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
; ALL RIGHTS RESERVED
.if __TI_EABI__
.asg DCL_runPI_A1, _DCL_runPI_A1
.endif
.global _DCL_runPI_A1
.sect "dcl32funcs"
; C prototype: int32_t DCL_runPI_A1(DCL_P... |
; one-line comment
#if
#elif
#endif
%if 0
%endif
#error \sdf\123
#warning wer
#define asdf = 123
word dword qword tword yword
db dw dd dq dt do dy
res resb resw resd resq rest reso resy
incbin equ times
/* multiline
comment
block */
.data
.bss
.text
section test
label1:
test ax, bx
label2: jmp label1
d... |
;// DEMO9.ASM
;//
;// Copyright (C)2005-2011 The NASMX Project
;//
;// This is a fully UNICODE aware, typedefined demo that demonstrates
;// using NASMX typedef system to make your code truly portable between
;// 32 and 64-bit systems using either ASCII or UNICODE
;//
;// Contributors:
;// Bryant Keller
;/... |
;
; Assembly "Hello, World!" for Linux
;
; Properly defined in <sys/syscall.h>
%define SYS_exit 1
%define SYS_write 4
section .text
global _start
_start:
; gdb doesn't like to stop at the entry point address, so
; we put a nop here for pure convenience
nop
write_hello:
mov edx, hello_len
mov ecx, hello
.l... |
SECTION code_ctype
PUBLIC asm_isbdigit
asm_isbdigit:
; determine if char is a binary digit
; enter : a = char
; exit : z flag if binary digit
; uses : f
cp '0'
ret z
cp '1'
ret
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Hierarchy
FILE: graphicBodyObjArray.asm
AUTHOR: Steve Scholl, Nov 15, 1991
ROUTINES:
Name Description
---- -----------
ObjArrayProcessChil... |
frame 1, 08
frame 2, 08
frame 3, 12
frame 4, 06
frame 3, 05
frame 5, 06
frame 3, 05
setrepeat 4
frame 3, 05
frame 6, 05
dorepeat 8
frame 6, 15
frame 2, 06
frame 1, 06
endanim
|
tilepal 0, GRAY, GRAY, BROWN, RED, BROWN, GREEN, GREEN, GREEN
tilepal 0, GREEN, GREEN, GRAY, GRAY, RED, RED, GREEN, BROWN
tilepal 0, GRAY, GRAY, GRAY, RED, BROWN, GREEN, GRAY, GRAY
tilepal 0, GRAY, GREEN, GRAY, GRAY, RED, RED, BROWN, BROWN
tilepal 0, BROWN, BROWN, RED, RED, BROWN, BROWN, GRAY, GRAY
tilepal 0, GRA... |
// Copyright Janet Davis, January 2018.
// Free for educational use.
// Exercises all computations on the A and D registers.
// This is not a program and cannot be tested by running the resulting
// .hack file. Instead, compare to the .hack file produced by the
// given assembler.
D=0
D=1
D=-1
D=D
D=A
D=!D
D=!A
D=-... |
LOAD mem[0]
Out
LOAD mem[1]
Out
STORE mem[2]
LOAD mem[0]
STORE mem[1]
LOAD mem[2]
STORE mem[0]
Out
LOAD mem[1]
Out
END |
GLOBAL keyPressed
GLOBAL getKey
section .text
keyPressed:
push rbp
mov rbp, rsp
in al, 64h
and al, 1h
mov rsp, rbp
pop rbp
ret
getKey:
push rbp
mov rbp, rsp
mov rax, 0h
in al, 60h
;seteamos en 0 el controlador de keypressed
mov bl, al
in al, 64h
and al, 11111110b
... |
pushpc
; Pokeys
org $0688E9
; 0688e9 jsl $0dba71
; 0688ed and #$03
; 0688ef tay
; 0688f0 lda $88d7,y
; 0688f3 sta $0d50,x
; 0688f6 lda $88db,y
; 0688f9 sta $0d40,x
; 0688fc rts
JSL rng_pokey_hook
RTS
; Agahnim
org $01ED6EF
; 1ed6ef jsl $0dba71
JSL rng_agahnim_hook
; Helmasaur
org $01E8262
; 1e8262 jsl $0... |
segment .text
global sum
sum:
push B
push A
call test
enter 0,0
mov EAX,[EBP+8]
add EAX,[EBP+12]
leave
ret |
.MODEL SMALL
.STACK 64
.DATA
STRING DB ?
SYM DB '$'
INPUT_M DB 0ah,0dh,0AH,0DH,'Enter a string:',0DH,0AH,'$'
OUTPUT_M DB 0ah,0dh,0AH,0DH, 'The output is:',0DH,0AH,'$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV DX,OFFSET INPUT_M
MOV AH,09
INT 21H
LEA SI,STRING
INPUT: MOV AH,01
INT 21H
MOV [SI],AL
INC S... |
;
; Keyboard routines for the Robotron VEB KC85/2,3,4
;
; By Stefano Bodrato - Oct. 2016
;
; getkey() Wait for keypress
;
;
; $Id: fgetc_cons.asm,v 1.2 2016-10-10 07:09:14 stefano Exp $
;
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
INCLUDE "target/kc/def/caos.def"
.fgetc_cons
._fgetc_cons
push iy
... |
DATA
x 5*5,4*4,3*3,2*2,1
PROGRAM
#imm R2 x translates into imlo R2 lower half of x's address
#followed by imhi R2 upper half of x's address
imm R2 x
#read r2 translates into imlo scr 0xfe
#followed by load R2 [scr]
read r2
#write r2 translates into imlo scr 0xff
#followed by stor [scr] R2
write r2
#not... |
Music_TrainerVictory:
musicheader 3, 1, Music_TrainerVictory_Ch1
musicheader 1, 2, Music_TrainerVictory_Ch2
musicheader 1, 3, Music_TrainerVictory_Ch3
Music_TrainerVictory_Ch1:
tempo 120
volume $77
dutycycle $2
tone $0001
notetype $8, $b1
octave 4
note E_, 2
note E_, 2
note E_, 2
note E_, 2
note F#, 2
n... |
/*
Example: print_string_v3.asm
This is a demonstration of nested structured statements.
This code uses an alternative string representation - the first byte is the
number of bytes in the string, and is followed by the data.
The stext macro is used to automatically prefix the string with its size... |
CGAFractal2 label byte
word C_BLACK
Bitmap <67,41,BMC_PACKBITS,BMF_MONO>
db 0xf8, 0x00
db 0xfe, 0x00, 0x05, 0x05, 0x80, 0x00, 0xa2, 0x60,
0x00
db 0xfe, 0x00, 0x05, 0x0d, 0x53, 0x01, 0x84, 0x00,
0x00
db 0xfe, 0x00, 0x05, 0x07, 0x9b, 0xa0, 0xff, 0x00,
0x00
db 0x08, 0x00, 0x00, 0x18, 0xd8, 0x1c, ... |
.686
.model flat,stdcall
option casemap:none
include windows.inc
include .\bnlib.inc
include .\bignum.inc
.code
; eax = errcode
_bn_error proc c
invoke RaiseException,eax,0,0,0
; invoke MessageBox,0,[bnErrMsgs+eax*4],0,MB_ICONERROR
ret
_bn_error endp
end |
;
; Memory unit tests
;
MemoryTest_Test:
call MemoryTest_TestSearchSlots
ret
MemoryTest_TestSearchSlots:
di
; does searching for test string yield the current slot?
ld hl,MemoryTest_TestSearchSlots_id
call Memory_GetSlot
push af
ld hl,MemoryTest_TestSearchSlots_Matcher
call Memory_SearchSlots
pop bc
call nc... |
; RisitOS / based on mikeOS / BSD Licence
; ------------------------------------------------------------------
; os_speaker_tone -- Generate PC speaker tone (call os_speaker_off to turn off)
; IN: AX = note frequency; OUT: Nothing (registers preserved)
os_speaker_tone:
pusha
mov cx, ax ; Store note valu... |
/* More startup code for A/UX */
#include "tconfig.h"
#ifdef USE_BIN_AS
file "crt2.s"
/* The init section is used to support shared libraries */
init
global __istart
__istart:
link %fp,&-4
#else
.file "crt2.s"
/* The init section is used to support shared libraries */
.section .init, "x"
.even
.globl __istart... |
; void *wv_priority_queue_data(wv_priority_queue_t *q)
SECTION code_adt_wv_priority_queue
PUBLIC wv_priority_queue_data
defc wv_priority_queue_data = asm_wv_priority_queue_data
INCLUDE "adt/wv_priority_queue/z80/asm_wv_priority_queue_data.asm"
|
; Allow us to print to screen, enable scrolling teletype BIOS routine
mov ah, 0x0e
; Ok so we've learnt some basic Assembly, let's write our own control structures like
; if, else, else if, while, for, etc.
; Let's write a do-while loop
; Let's use bx to keep track of our iteration variable. Let's write 'A' to ... |
SECTION code_fp_math32
PUBLIC ___fseq
EXTERN cm32_sdcc___fseq
defc ___fseq = cm32_sdcc___fseq
|
// ARM9 binary
.nds
.thumb
.open "temp\arm9.dec",0x02000000
// Zero 3 always inserted
.org IsZero3Inserted
.area 0x38
mov r0,0x1
bx lr
.endarea
// Zero 4 always inserted
.org IsZero4Inserted
.area 0x38
mov r0,0x1
bx lr
.endarea
// Load data from GBA
.org LoadGbaFile
.area 0x528
push r4,lr
sub sp,(0xC+0x4C) //... |
.ps2
.open "00016_0000d.org", "00016_0000d.unknown", 0x003D4080
;copy_battle_icons equ 0x0057B6C0
;fix prologue
.org 0x00400EB4
sw ra,0x34(sp) ; changed from sw and moved to 0x34
;original calls to a custom string copy
;replaced to allow using the nice icons
;for Weak and Resist during battle
.org 0x00401078... |
; Substitute for the z80 lddr instruction
; Doesn't emulate the flags correctly
SECTION code_crt0_sccz80
PUBLIC __z80asm__lddr
.__z80asm__lddr
push af
loop:
ld a,(hl)
ld (de),a
dec hl
dec de
dec bc
ld a,b
or c
jp nz,loop
pop af
ret
|
%include 'src/include/functions.asm'
SECTION .data
filename db 'readme.md', 0h
contents db '# ASMFTW', 0h
SECTION .text
global _start
_start:
mov ecx, 0777 ; r, w, x
mov ebx, filename
mov eax, 8 ; sys_creat opcode
int 80h
mov edx, 8 ; bytes to write
mov ecx, contents... |
; void *p_stack_pop(p_stack_t *s)
SECTION code_adt_p_stack
PUBLIC p_stack_pop
defc p_stack_pop = asm_p_stack_pop
INCLUDE "adt/p_stack/z80/asm_p_stack_pop.asm"
|
;
; Basic stdio handling for the OSCA architecture
; By Stefano Bodrato Jul. 2011
;
; Print character to the screen
;
;
; $Id: fputc_cons.asm,v 1.7 2015/01/19 01:33:21 pauloscustodio Exp $
;
INCLUDE "flos.def"
PUBLIC fputc_cons
EXTERN cursor_x
;
; Entry: char to print
;
.fputc_cons
ld hl,3
add h... |
#������ˮ�߲��ԣ�����ָ���������ԣ�һ��17��ָ�5����ˮ��ִ��������Ӧ����5+(17-1��=21
addi $s0,$zero, 0
addi $s1,$zero, 0
addi $s2,$zero, 0
addi $s3,$zero, 0
ori $s0,$s0, 0
ori $s1,$s1, 1
ori $s2,$s2, 2
ori $s3,$s3, 3
sw $s0, 0($s0)
sw $s1, 4($s0)
sw $s2, 8($s0)
sw $s3, 12($s0)
addi $v0,$zero,10 # system call for exit
add... |
dc.w word_20E48-Map_SurfboardIntro
dc.w word_20E4A-Map_SurfboardIntro
dc.w word_20E5E-Map_SurfboardIntro
dc.w word_20E72-Map_SurfboardIntro
dc.w word_20E8C-Map_SurfboardIntro
dc.w word_20EA0-Map_SurfboardIntro
dc.w word_20EB4-Map_SurfboardIntro
dc.w word_20ECE-Map_SurfboardIntro
dc.w word_20EE8-Map_Su... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: bigcalcVariablePCF.asm
AUTHOR: Christian Puscasiu, May 6, 1992
ROUTINES:
Name Description
---- -----------
INT VAItemFillInArg... |
Entity start
No options
Constants
0 S start
1 S result
2 S x
3 S result:
4 I 2
5 S io.writeln
6 S oi
End
Valid context (always)
No properties
Def start
No parameters
Local variables
0 string result
End
No results
ldself
mcall 2 --> [x]
stvar 0 --> [result]
ldconst 3 --> [result: ... |
/*****************************************************************************
Name : sgxinit_secondary.pds.asm
Title : PDS Assembly Code
Author : Imagination Technologies
Created : 23/05/2008
Copyright : 2009 by Imagination Technologies Limited. All rights reserved.
No part of this software, either m... |
;---------------------------------------------------------------
; PIO 0: Keyboard and LCD Display
;
; The keyboard interface is connected to port A and is designed
; to use PIO mode 1. Input data from the keyboard is strobed into
; the port whenever the port A is ready (... |
opt x+
opt d
;Symbol definitions - symbols have to be here to show up in the debugger
SECTION CODE
xdef START
xdef ShowFileSelector
xdef WaitForKeypress
xdef VDIInit
xdef MakeMainWindow
xdef CheckEventType
xdef RedrawMainWindow
xdef DoVsClip
xdef DoWindGet
xdef ProcessWindowMoved
xdef UnhandledEventType... |
.data
msg1: .asciiz "Enter a vaule for A:\n"
msg2: .asciiz "Enter a vaule for B:\n"
msg3: .asciiz "Enter a vaule for C:\n"
msg4: .asciiz "Complex Root"
four: .float 4
two: .float 2
answer: .asciiz "The value of x1 is:"
answer1: .asciiz "\nThe value of x2 is:"
.text
main:
l.s $f2, four
l.s $f3, two
li $v0,... |
; Second test tile
main:
MOV r0 0
start:
CMP r0 0x00FFFFFF
>= JMP end
INC r0
JMP start
end:
HALT
|
; 1 2 3 4 5 6 7
;234567890123456789012345678901234567890123456789012345678901234567890
;=====================================================================
;
; *** TEST ***
;
;-------------------------------------------------------------... |
global _start
%include "header.inc"
mov dword [esp], 0x03479aef
mov dword [esp+4], 0x03479aef
mov dword [esp+8], 0x03479aef
mov dword [esp+12], 0x03479aef
mov dword [esp+16], 0x03479aef
mov dword [esp+20], 0x03479aef
mov dword [esp+24], 0x03479aef
mov dword [esp+28], 0x03479aef
mo... |
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
db 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
db 4, 68, 5, 5, 5, 5, 69, 7, 7, 7, 71, 71, 71, 71, 71, 71
db 71, 35, 35, 35, 35, 35, 35, 42, 42, 42, 42, 42, 42, 42, 42, 42
db 42, 42, 42, 42, 56, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61
db 61, 61, 61, 61, 61, 6... |
SECTION code_clib
SECTION code_math
PUBLIC l_small_divs_16_16x16, l0_small_divs_16_16x16
EXTERN l_neg_hl, l_neg_de
EXTERN l0_small_divu_16_16x16, error_divide_by_zero_mc
; alternate entry to swap dividend / divisor
ex de,hl
l_small_divs_16_16x16:
; signed division of two 16-bit numbers
;
; ente... |
; ===============================================================
; Mar 2014
; ===============================================================
;
; size_t bv_stack_capacity(bv_stack_t *s)
;
; Return current capacity of the stack.
;
; ===============================================================
SECTION code_clib
SE... |
SECTION "random_vars", WRAM0
RandState:: DS 2
SECTION "random", ROM0
; could switch to ISSOtm's one later if this one isn't random enough?
; https://github.com/ISSOtm/gb-starter-kit/blob/master/src/misc/rand.asm
; Seeding the generator is accomplished by just setting RandState.
; Make sure it isn't 0!
; Generate a ... |
; prints a string in 32-bit protected mode
; currently always writes the text at the beginning of the display, overwriting everything written before
[bits 32]
VIDEO_MEMORY equ 0xb8000
WHITE_ON_BLACK equ 0x0f
func_pm_print_string:
pusha
mov edx, VIDEO_MEMORY
func_pm_print_string_loop:
mov al, [ebx]
mov... |
tilecoll 01, 01, 01, 01 ; 00
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
tilecoll WALL, WALL, FLOOR, FLOOR ; 02
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
tilecoll WALL, FLOOR, WALL, FLOOR ; 04
tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 05
tilecoll WALL, WALL, WALL, COUNTER ; 06
tilecoll WALL, WALL,... |
_main:
;keypad_codigo.c,1 :: void main()
;keypad_codigo.c,3 :: PORTD =0x00;
CLRF PORTD+0
;keypad_codigo.c,5 :: TRISD.TRISD1 = 1;
BSF TRISD+0, 1
;keypad_codigo.c,6 :: TRISD.TRISD2 = 1;
BSF TRISD+0, 2
;keypad_codigo.c,7 :: TRISD.TRISD0 = 1;
BSF TRISD+0, 0
;keypad_codigo.c,9 :: ... |
*PROCESS DUPALIAS
*
* Compiled by DCC Version 2.25.07 Mar 6 2021 08:51:07
* on Fri Apr 30 15:35:15 2021
*
WXTRN @@ZARCH#
*
*
*
* Code Section
*
@CODE ALIAS C'@RDBUF'
@CODE CSECT
@CODE AMODE ANY
@CODE RMODE ANY
@DATA ALIAS C'@rdbuf'
crc32c ALIAS C'crc32c'
EXTRN crc32c
m... |
section .text
global _start
section .data
msg db 'hello world',0xa ;0xa is the ascii code for a new line
len equ $ -msg
section .text ;section declaration
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
mov ebx,0
mov eax,1
int 0x80
|
.section __TEXT,__text,regular,pure_instructions
.align 4, 0x90
.globl _main
_main:
pushl %ebp
movl %esp, %ebp
pushl %ebx
pushl %eax
call L00001F7A
L00001F7A:
popl %eax
movl $0, -8(%ebp)
movl 146(%eax), %ecx
movl %ecx, 138(%eax)
movw %cx, %dx
movw ... |
;
; CPU.ASM
;
; (c) Copyright 2005, vbmacher
;
;
.model compact
.486
.data
.code
extrn _vendor_str
extrn _brand_str
; POZOR: tato funkcia sa moze volat AZ ked je na 100% iste,
; ze procesor podporuje CPUID
public _checkBRAND
_checkBRAND proc
mov eax, 80000000h
db 0Fh ;cpuid
db 0A2h
;chcem brand string (cize ... |
.size 8000
.text@48
jp lstatint
.text@100
jp lbegin
.data@143
c0
.text@150
lbegin:
ld a, 00
ldff(ff), a
ld a, 30
ldff(00), a
ld a, 01
ldff(4d), a
stop, 00
ld c, 41
ld b, 02
ld d, 03
lbegin_waitm2:
ldff a, (c)
and a, d
cmp a, b
jrnz lbegin_waitm2
ld a, 08
ldff(c), a
ld a, 02
ldff(ff), a
ei
.te... |
; This code will not run, nor will it assemble
; this is just an explanation on how the heap1 binary functions
push ebp ; this seems to be an x86 binary, hehe nice
mov ebp,esp ; establish stack frame
and esp,0xfffffff0 ; round the stack pointer
sub esp... |
@; TIM2 - TIM5
.macro ENABLE_TIMx TIMx_INDEX
MOV_imm32 r0, (1 << \TIMx_INDEX)
MOV_imm32 r1, RCC_APB1ENR
ldr r2, [r1]
orr r2, r0
str r2, [r1]
.endm
.macro DISABLE_TIMx TIMx_INDEX
MOV_imm32 r0, ~(1 << \TIMx_INDEX)
MOV_imm32 r1, RCC_APB1ENR
ldr r2, [r1]
and r2, r0
str r2, [r1]
.endm
.macro TIMx_CLEAR_S... |
# f = (a – b) + (c + d)
ADDI $s0, $zero, 5
ADDI $s1, $zero, 5
ADDI $s2, $zero, 5
ADDI $s3, $zero, 5
SUB $t0, $s0, $s1
ADD $t1, $s2, $s3
ADD $s4, $t0, $t1 |
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1
include listing.inc
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?strcmp@@YAHPEBD0@Z ; strcmp
PUBLIC ?strcpy@@YAPEADPEADPEBD@Z ; strcpy
PUBLIC ?strlen@@YA_KPEBD@Z ; strlen
PUBLIC ?strncmp@@YAHPEBD0_K@Z ; strncmp
PUBLIC ?strncp... |
; ------------------------------------------------------------------
; MichalOS Terminal
; ------------------------------------------------------------------
BITS 16
%INCLUDE "osdev.inc"
ORG 100h
start:
call os_clear_screen
mov si, terminal_name
mov di, 00F0h
call os_string_copy
mov byte [0082h], 1
cmp... |
%ifdef ERROR
%define ERR(x) x
%else
%define ERR(x)
%endif
bits 16
rdpid eax
ERR(rdpid ax)
bits 32
rdpid ebx
ERR(rdpid bx)
bits 64
rdpid rcx
rdpid ecx
ERR(rdpid cx)
|
%include "macros/patch.inc"
%include "macros/datatypes.inc"
%include "TiberianSun.inc"
;;; Don't create a radar event for a new unit or building being placed
@CLEAR 0x004BED18, 0x90, 0x004BED1E
@LJZ 0x004BD438, _HouseClass__Attacked_spectator_events
cextern IsSpectatorArray
section .text
_HouseClass__Attacked_specta... |
; Coder Name: Hamza Haroon
; 01/20/2022
; https://github.com/hamzaharoon1314
.CODE
mov AX,0012h
int 10h
mov ah,0ch
mov al,6
; <----- Phone Frame ----->
; ROW AND COL SET
mov cx,200 ;COL
mov dx,80 ;ROW
; BOX CODE
MOV BX,250
MobileLine1:
int 10h
INC DX
DEC BX
... |
.test "ok" {
.assert 1 == 1 "nice"
brk
}
.test "fail" {
.assert 1 == 2 "whoops"
} |
; A107973: Numbers of the form a^2 + b for a= 21 to 40 and b= 20 to 1 step -1.
; 461,503,547,593,641,691,743,797,853,911,971,1033,1097,1163,1231,1301,1373,1447,1523,1601
add $0,21
bin $0,2
mov $1,$0
sub $1,210
mul $1,2
add $1,461
|
;조건
;1. 초기갑이 있는 메모리 변수 4개를 선언하고 크기는 1, 2, 4, 8byte로 하고
;값을 16진수로 초기화
;2. 초기값이 없는 메모리 변수 1, 2, 4, 8byte 크기를 각각 1개씩 선언하고
;조건 1에서 선언한 값을 복사
;3. 변수 8개를 모두 16진수로 출력
%include "io64.inc"
section .text
global CMAIN
CMAIN:
;write your code here
xor rax, rax
ret |
section .data
fname db "assign10.asm",0 ;saves asciiz value of file(hello) in var(fname)
section .bss
buffer resb 512 ;reserve buffer of 512 bytes for contents
fid resd 1 ;reserve buffer of 4bytes for file discriptor
cnt resd 1 ;reserve buffer of 4bytes for actual size of contents in buffer
section .text
global _s... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: floatStack.asm
AUTHOR: jimmy lefkowitz
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 1/91 Initial revision
jimmy 6/... |
.MACRO LKS_DMA_PORTX
lda #1
sta LKS_DMA.Enable,x
lda \1
sta LKS_DMA.Bank,x
rep #$20
lda #\2
sta LKS_DMA.SrcR,x
lda \3
sta LKS_DMA.Src1,x
lda #\4
sta LKS_DMA.Dst1,x
sep #$20
lda #\5
sta LKS_DMA.Type1,x
.ENDM
.MACRO LKS_DMA_VRAM2
lda LKS_DMA_SEND.Enable+\1
cmp #0
beq +
rep ... |
.byte $01 ; Unknown purpose
.byte OBJ_PIRANHASIDEWAYSRIGHT, $0B, $0D
.byte OBJ_PIRANHASIDEWAYSLEFT, $05, $0F
.byte OBJ_GREENPIRANHA, $04, $42
.byte OBJ_REDTROOPA, $05, $52
.byte OBJ_PIRANHASIDEWAYSLEFT, $0B, $5B
.byte OBJ_GREENPIRANHA, $04, $61
.byte OBJ_GREENTROOPA, $0D, $67
.byte OBJ_GREENTROOPA, $0F, $67
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.