content
stringlengths
23
1.05M
ldy #0 clc lda ({z2}),y adc {m3} sta ({z1}),y iny lda ({z2}),y adc {m3}+1 sta ({z1}),y
.text addi $t0, $zero, 0 # i = 0 addi $t7, $zero, 10 # max = 10 for: slt $t1, $t0, $t7 # condition (step 1) beq $t1, $zero, endfor # condition (step 2) # put your code here li $v0, 1 # load service to print an integer add $a0, $t0, $zero # load value to register $a syscall # end of code add...
; https://docs.microsoft.com/en-us/windows/console/getstdhandle STD_OUTPUT_HANDLE equ -11 NULL equ 0 extern GetStdHandle extern WriteFile extern ExitProcess global main section .data msg db "hello world",0dh,0ah, msgSize equ $-msg section .bss alignb 8 lpNumberOfBytesWritten resq 1 section .text main: sub ...
%ifdef CONFIG { "RegData": { "R15": "0xFFFFFFFFFFFFFFFF", "R14": "0x4141414141410000", "R13": "0", "R12": "0", "R11": "0" } } %endif mov cl, 0 mov r15, -1 mov r14, 0x4141414141410000 mov r13, 0 mov r12, 0 mov r11, 0 ; Get the incoming flags mov rax, 0 lahf mov r11, rax shrd r14w, r15w, cl shr...
.include "header.inc" .include "misc_macros.inc" .include "zeropage.inc" .include "text.inc" .bank 0 slot 1 .section "messages code/data" .define MSG_X 3 .define MSG_Y 25 _str_good_luck: .db "GOOD LUCK!",0 _str_solving: .db "SOLVING...",0 _str_cancelled: .db "CANCELLED",0 _str_well_done: .db "WELL DONE!",0 _str_don...
;********************************************************************** ;Led headlamp ;PIC 16F616 ;internal 8MHz ;------------------------------ ; Jakub Kaderka ; jakub.kaderka@gmail.com ; 2015 ;------------------------------ ; ad.asm ;------------------------------ ; This task determines the actual voltage and shuts s...
-- HUMAN RESOURCE MACHINE PROGRAM -- a: COPYFROM 5 COPYTO 1 b: INBOX JUMPZ c ADD 1 COPYTO 1 JUMP b c: COPYFROM 1 OUTBOX JUMP a DEFINE LABEL 1 eJzTYGBgmCizbLuVbM3M2wpO+fLqf2159M7LrDY6If7F7IT4e4sLslOt7qrZWcuGOlpZZm7Vm74GqIWh RiWk5rBmYNUXs4BKEH9HDqPjg1hmp...
; @Author: Rohit Nagraj assume cs:code, ds:data data segment pa equ 20A0h pb equ 20A1h pc equ 20A2h cr equ 20A3h msg db "No of 1s : " ones db ?,"$" data ends code segment start: mov ax,data mov ds,ax mov dx,cr mov al,82h ; PA output...
; 1. to load 2 hexadecimal no. in A and C and display the output to ; reg B MVI A, 32H MVI C, 48H ADD C MOV B, A HLT
(Class1.set) @0 D=A @i M=D D=M @Class1.set.0 D;JEQ (Class1.set..0) @SP A=M M=0 @SP D=M D=D+1 M=D @i D=M D=D-1 M=D @Class1.set..0 D;JNE (Class1.set.0) @0 D=A @ARG A=M+D D=M @SP A=M M=D @SP M=M+1 @SP M=M-1 A=M D=M @C:\Weisler\Study\Nand2Tetris\projects\08\FunctionCalls\StaticsTest\Class1.asm.0 M=D @1 D=A @ARG A=M+D D=M @...
.686P .model flat, stdcall ExitProcess PROTO STDCALL :DWORD includelib kernel32.lib includelib legacy_stdio_definitions.lib printf PROTO C :VARARG scanf PROTO C :VARARG getchar PROTO C:VARARG public indexMID,LOWF,MIDF,HIGHF,stream tuple struct SDA dd 0 SDB dd 0 SDC dd 0 tuple ends .DATA LOWF ...
.MODEL small .STACK .DATA first_line DB 50 DUP(?) second_line DB 50 DUP(?) third_line DB 50 DUP(?) fourth_line DB 50 DUP(?) occurence_first DB 52 DUP (?) occurence_second DB 52 DUP (?) occurence_third DB 52 DUP (?) occurence_fourth DB 52 DUP (?) max_msg DB "Max character: A (01)",13,10,"Max/2 characte...
; vasmm68k_mot[_<HOST>] -Fbin -o icon_36_336/def_drawer.info def_drawer-icon_36_336.asm ; ; Default "ENV:def_drawer.info" data included in "icon 36.336 (8.6.90)". ; include deficon.inc ifne DEFICON_MEM align 1 endif defIconDrawer: dc.w $E310 ; do_Magic = WB_DISKMAGIC dc.w $0001 ...
; ================================ KLC3 ENTRY CODE ================================ ; This piece of code serves as the entry point to your PRINT_CENTERED subroutine. ; The test string is stored at x2700, whose address is loaded into R1 before calling your subroutine. .ORIG x3000 LD R1, KLC3_TEST_STRING_ADDR JSR PRIN...
main: mov x5, 0 blt ops inc x5 bgt ops inc x5 bge ops inc x5 ble ops inc x5 beq ops inc x5 bgt ops inc x5 mov x1, 0 inc x5 div x0, 123 inc x5 div x0, 1 inc x5 shr x0, x1 inc x5 shr x0, 123 inc x5 shl x0, x1 in...
ThreadIdxToNode: ; in: ecx index (n) of thread ; out: rax address of numa noda mov r8d, dword[threadPool.coreCnt] mov r9d, dword[threadPool.nodeCnt] lea r10, [threadPool.nodeTable] mov eax, ecx xor edx, edx ...
; Rectangle, Intervals and Points ; 05.2006 aralbrec PUBLIC r_IsIvalInIval8 EXTERN RIsIvalInIval8 ; int r_IsIvalInIval8(struct r_Ival8 *i1, struct r_Ival8 *i2) .r_IsIvalInIval8 ld hl,2 add hl,sp ld e,(hl) inc hl ld d,(hl) inc hl ex de,hl ld b,(hl) inc hl ld c,(hl) ex de,hl ld e,...
section .text global slm_submit_result slm_submit_result: ; NOP used for avoid compiler optimizations xor rax, rax ret
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s .data t1_value equ 1 or 2 t1 BYTE t1_VALUE DUP (0) ; CHECK-LABEL: t1: ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 0 ; CHECK-NOT: .byte 0 t2_value equ 4 or t1_value t2 BYTE t2_VALUE ; CHECK-LABEL: t2: ; CHECK-NEXT: .byte 7 t3_value equ t1_VALUE o...
;-------------------------------------------------------------- ; ZX81 HRG library for the Memotech expansion ; by Stefano Bodrato, Feb. 2010 ;-------------------------------------------------------------- ; ; Invert HRG video output (hardware) ; ; $Id: mt_invhrg.asm,v 1.1 2010/02/10 16:15:35 stefano Exp $ ; XLIB i...
beq, R0, R0, 1 ld, R1, 1(R0) ld, R1, 4(R0)
100 ;COVOX DIGITIZED SPEECH DEMO 110 ; 120 ;(C) 1989 STEVE GOLDSMITH 130 ; 140 ; 150 R6510 = $01 ;INPUT/OUTPUT REGISTER 160 ; 170 ;CIA #1 CHIP 180 ; 190 PORTA1 = $DC00 ;CIA #1 DATA PORT REGISTER A 200 DDRA1 = $DC02 ;CIA #1 DATA DIRECTION REGISTER PORT A 210 ICR1 = $DC0D ;INTERRUPT CONTROL REGISTER 220 ; 230 ;CIA #2 CHI...
; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 10 ; Bound: 104 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" %79 OpExecutionMode %4 OriginU...
[bits 64] %define X540_BASE_PORT 1400 ; x540_fetch_pci ; ; Summary: ; ; This function enumerates all PCI devices and returns the PCI request needed ; for the first device encountered with VID 8086 and DID 1528 ; ; Parameters: ; ; None ; ; Alignment: ; ; None ; ; Returns: ; ; on Success: rax = PCI request on success ;...
extern real_routine global get_e820 %define kernel_phys_offset 0xffffffffc0000000 section .data %define e820_size e820_end - e820_bin e820_bin: incbin "real/e820.bin" e820_end: section .text bits 64 get_e820: ; void get_e820(e820_entry_t *e820_map); push rbx push rbp p...
MODULE generic_console_ioctl PUBLIC generic_console_ioctl SECTION code_clib EXTERN generic_console_cls EXTERN __console_h EXTERN __console_w EXTERN generic_console_font32 EXTERN generic_console_udg32 INCLUDE "ioctl.def" ; a = ioctl ; de = arg generic_console_ioctl: ex de,hl ld c,(hl) ;bc = where we poi...
CeladonMansion1F_Object: db $f ; border block def_warps warp 4, 11, 2, LAST_MAP warp 5, 11, 2, LAST_MAP warp 4, 0, 4, LAST_MAP warp 7, 1, 1, CELADON_MANSION_2F warp 2, 1, 2, CELADON_MANSION_2F def_signs sign 4, 9, 5 ; CeladonMansion1Text5 def_objects object SPRITE_MONSTER, 0, 5, STAY, RIGHT, 1 ;...
; Digger Remastered ; Copyright (c) Andrew Jenner 1998-2004 */ PUBLIC N_LDIV@,F_LDIV@,LDIV@,N_LUDIV@,LUDIV@,F_LUDIV@,N_LMOD@,LMOD@,F_LMOD@ PUBLIC N_LUMOD@,LUMOD@,F_LUMOD@,N_LXLSH@,F_LXLSH@,LXLSH@,N_LXMUL@,N_PADA@ PUBLIC F_PADA@,PADA@,N_PSBA@,F_PSBA@,PSBA@,N_PADD@,F_PADD@,PADD@,N_PSUB@ PUBLIC F_PSUB@,PSUB@,N_SCOPY@ _T...
SFX_Super_Effective_Ch8: noise_note 4, 15, 1, 52 noise_note 15, 15, 2, 100 sound_ret
; =========================================================================== ; --------------------------------------------------------------------------- ; Routine to execute tracker commands ; ; The reason we use add.b instead of add.w, is to get rid of some bits that ; would make this kind of arbitary jumping way m...
; /******************************************************************* ; * ; * Author: Kareem Omar ; * kareem.h.omar@gmail.com ; * https://github.com/komrad36 ; * ; * Last updated Mar 12, 2021 ; *******************************************************************/ _TEXT$FastContains8 SEGMENT ALIGN(64) Fast...
; Copyright (C) 2020 Matt Currie <me@mattcurrie.com> ; ; 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, mer...
SECTION "Map_2277", ROM0[$B800] Map_2277_Header: hdr_tileset 22 hdr_dimensions 8, 6 hdr_pointers_a Map_2277_Blocks, Map_2277_TextPointers hdr_pointers_b Map_2277_Script, Map_2277_Objects hdr_pointers_c Map_2277_InitScript, Map_2277_RAMScript hdr_palette $08 ...
;256 color normal routines ;routines ending in "1" are vector drawers: ; DS:SI preserved ; OUT 3C4,02h required ; DS=CS & ES=vram required ALIGN 4 nrpset PROC FAR ;requires: OUT 3C4,2 ;DS:SI preserved, CX preserved! shl bx,1 mov di,ds:rows[bx] mov bx,3 and bx,dx sar dx,2 add di,dx mov al,ds:...
; Copyright 2012 Bubble Zap Games ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writi...
org 0x8000 wibble = 0x9000 register = 0xff start LDIX LDWS LDIRX LDDX LDDRX LDPIRX OUTINB MUL D,E MUL de ADD HL,A ADD DE,A ADD BC,A ADD HL,49152 ADD DE,49152 ADD BC,49152 add hl,wibble add de,start+20-20 add bc,data SWAPNIB MIRROR PUSH 49152 push ...
[ORG 0x7c00] mov ah, 2 ; comando para ler o disco que originou o boot mov al, 1 ; total de setores lidos mov ch, 0 ; Numero do cilindro mov cl, 2 ; Numero do setor para começar a ler mov dh, 1 ; Numero da cabeça a ser lida mov es, [EXTENSION] mov bx, 0 int 13h jmp PRINT_STRING STR: d...
; PAR/SER device initialisation V2.01  1989 Tony Tebby QJUMP ; Interrupt version for Atari section par xdef par_init xref.l par_vers xref par_tnam xref par_thing xref par_procs xref ut_procdef xref ser_init xref par_int xref par_actv xref iou_idset xref iou_idlk xref iou_lkvm xref gu_thzlk in...
; See data/evos_moves.asm ; Evolution types EV_LEVEL EQU 1 EV_ITEM EQU 2 EV_TRADE EQU 3 MAX_EVOLUTIONS EQU 3 EVOLUTION_SIZE EQU 4
; multi-segment executable file template. data segment ; add your data here! x db 10 y db 100 z dw 12efh k dd 12005e32h ; q dq 0 pkey db "press any key...$" ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax ...
include bls.inc ip_main ; jsr bda_init VDPUSEADDR VDPSETREG 1, VDPR01 | VDPDISPEN VDPSETREG 11, VDPR11 | VDPEINT move.w #$2000, sr ; Enable BDA interrupt move.b #CSEL, CCTRL1 ; Enable select line on pad 1 move.b #0, CDATA1 ; Select A/Start line nop nop ; Wait until pressed START .1 btst #BCBTNST...
; This table translates key presses into ascii codes. ; Also used by 'GetKey' and 'LookupKey'. An effort has been made for ; this key translation table to emulate a PC keyboard with the 'CTRL' key SECTION rodata_clib PUBLIC in_keytranstbl .in_keytranstbl ;Unshifted ; Lower 5 bits only defb 27, '1', 'q', 'a', '...
edit_player: call get_player_location ld (sheet_xy),de ld hl,edit_player_functions jp edit edit_player_functions: dw edit_player_blink_sprite dw edit_player_restore_sprite dw edit_player_put_player dw edit_sheet_delete_pattern edit_player_put_player: ...
NAME MCRML ; local include files $INCLUDE(macro.inc) CGROUP GROUP CODE CODE SEGMENT PUBLIC 'CODE' ASSUME CS:CGROUP, SS:STACK, DS:DATA TESTMACROS: MacroTestInit: MOV AX, STACK ;initialize the stack pointer MOV SS, AX MOV AX, DATA ;ini...
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: UserInterface/Gen FILE: GenBoolean.asm ROUTINES: Name Description ---- ----------- GLB GenBooleanClass Item object REVISION HISTORY: ...
; CISP 310 - Michael Dinh ; Assignment 4: Gas Mileage ; 10/11/2020 INCLUDE io.h .DATA tankCap DWORD ? gasMile DWORD ? prompt1 BYTE "Enter how many gallons of gas your car can hold.", 0 prompt2 BYTE "Enter how many miles your car can drive on a full tank.", 0 string BYTE 40 DUP (?) resultLb BY...
;; ; ; Name: single_reverse_tcp_shell ; 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: ; ; Single reverse TCP shell. ; ; Meta...
; $Id: __U4M.asm $ ;; @file ; Compiler support routines. ; ; ; Copyright (C) 2012-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 under the terms of the GNU ; Gen...
section .data number dw 0x245 section .text global _start _start: mov ax, [number] mov cx, 3 mov bx, 16 xor rdx, rdx do: div bx mov r8, 10 mov r9, rax mov rax, rdx mul r8 mov r10, rax mov rax, r9 add r10, rdx loop do exit: mov ebx, 0 mov eax, 1 int 80h
bits 16 cpu 8086 pop cs mov cs,ax cpu 386 pop cs mov cs,ax cpu any pcommit
MOV AX, 0100h MOV DS, AX MOV AX, 0000h MOV AL, 0C2h MOV DL, DS:[1000] CMP AL, DL JE flagesitsebire MOV DS:[1100h],0AAh JNZ zipla flagesitsebire: MOV DS:[1100h],0FFh zipla: ret
; Assembly Level Program 12a ; Write an Assembly Level Program to create a file with a given File Name .model SMALL .data FNAME dB 'SampleFile.txt', 00h SUCCESS dB 10, 13, 'File has been created successfully!$' FAILURE dB 10, 13, 'An Error Occured during File Creation!$' .code ; Initialize Data Segment MOV AX,...
.386 .model flat,c .code ; Reverser(DESC, SRC, SIZE) Reverser PROC ; Routine prolog. push ebp mov ebp,esp push esi push edi ; Routine code. xor eax, eax ; EAX = 0 mov edi, [ebp+8] ; EDI = Destination array mov esi, [ebp+12] ; ESI = Source array mov ecx, [ebp+16] ; ECX = Size test ecx, ecx lea esi, [esi...
sb $0,14($0) subu $3,$3,$3 xor $6,$4,$3 sh $4,8($0) xor $3,$3,$3 addiu $6,$3,-25283 sh $1,16($0) srl $4,$4,23 sll $5,$3,24 ori $6,$4,31108 slt $4,$3,$3 srlv $4,$1,$3 lw $1,16($0) addu $3,$3,$3 addu $0,$3,$3 sw $2,12($0) or $3,$3,$3 xori $1,$5,65452 lhu $4,8($0) sllv $3,$0,$3 lw $4,16($0) sltu $1,$1,$3 srav $3,$4,$3 sub...
; racer-utils.asm ; Utils and macros ; ==================================================================== ; Return a random number from 1-255 using SID Voice #3 - thanks Golan ; ==================================================================== RANDOM255 LDA #$FF STA $D40F LDA #$80 STA $D412 LDA $D41B ...
copyright zengfr site:http://github.com/zengfr/romhack 00478C ext.w D0 005B88 beq $5b90 [123p+ 16, enemy+16] 005BE8 beq $5bec [123p+ 16] 00799E moveq #$0, D0 [123p+ 16, enemy+16] 0079F8 beq $79fc [123p+ 16, enemy+16] 007C18 move.b ($16,A1), D1 [enemy+8A] 007C1C move.b ($30,A1), D0 [123p+ 16] ...
; ; CPC Maths Routines ; ; August 2003 **_|warp6|_** <kbaccam /at/ free.fr> ; ; $Id: init_floatpack2.asm,v 1.2 2015/01/22 12:09:57 stefano Exp $ ; ; Dummy initialisation for machine tailored libraries PUBLIC init_floatpack .init_floatpack ret
COMMENT @----------------------------------------------------------------------- Copyright (c) Geoworks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: AUTHOR: Cheng, 1/91 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ---...
//define LOG_PPU_DATA() //define LOG_VRAM_ADDR() //define LOG_SPRITES() //define DUMP_RGB_PALETTE() //define DUMP_VRAM() begin_low_page() align_dcache() // 0x0000-0x4000 in 0x400 (1K, >>10) pages ppu_map:; fill 4*16 align(8) ppu_bg32_pat_lines:; dd 0,0 ppu_bg32_atr_lines:; dd 0 ppu_bg_x_lines:; dd 0 ppu_sp_pr...
.LALL TITLE $EXVECTOR .386P INCLUDE VMM.INC INCLUDE EXVECTOR.INC ; the following equate makes the VXD dynamically loadable. %DEVICE_DYNAMIC EQU 1 DECLARE_VIRTUAL_DEVICE %DEVICE, 1, 0, <%DEVICE>_Control, Undefined_Device_Id, Vmm_init_order ; ; LData ; VxD_LOCKED_DATA_SEG Public bInitAlrea...
.org 0x8C032CC :: .incbin "m12-enemynames.bin" .org 0x8B1A2F4 :: dw 0x000E97FC .org 0x8B1A2F8 :: dw 0x000E9802 .org 0x8B1A2FC :: dw 0x000E9812 .org 0x8B1A300 :: dw 0x000E9825 .org 0x8B1A304 :: dw 0x000E9833 .org 0x8B1A308 :: dw 0x000E9840 .org 0x8B1A30C :: dw 0x000E984E .org 0x8B1A310 :: dw 0x000E985A .org 0x8B1A314 :...
SFX_Battle_35_Ch5: execute_music vibrato 10, 2, 4 duty_cycle 2 note_type 10, 8, 7 octave 5 note G#, 8 octave 6 note F#, 4 note E_, 4 octave 5 note G#, 8 sound_ret SFX_Battle_35_Ch6: execute_music vibrato 10, 2, 3 duty_cycle 2 note_type 11, 6, 7 octave 5 note G#, 8 note_type 10, 6, 7 octave 6 note...
dnl ARM64 mpn_submul_1 dnl Contributed to the GNU project by Torbjörn Granlund. dnl Copyright 2013 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GN...
.CODE fiber_align_check_failed PROTO C fiber_asm_switch PROC mov rax, [rdx] mov r8, [rax] mov [rcx + 0], rsp mov [rcx + 8], rbx mov [rcx + 16], rbp mov [rcx + 24], rdi mov [rcx + 32], rsi mov [rcx + 40], r12 mov [rcx + 48], r13 mov [rcx + 56], r14 mov [rcx + 64], r15 lea rcx, [rcx + 72 + 8] ...
Name: work.asm Type: file Size: 6213 Last-Modified: '1991-04-18T07:36:01Z' SHA-1: 6845A186CBEAE41221B0454B19384F3E7C1ECC3E Description: null
; Stub for the TI 83+ calculator ; ; Stefano Bodrato - Dec 2000 ; Feb 2000 - Speeded up the cpygraph ; ; $Id: ti83p_crt0.asm,v 1.33 2016-07-11 05:58:34 stefano Exp $ ; ; startup = ; n - Primary shell, compatible shells ; (Primary shell merely means it's the smallest implementation ; for that shell, tha...
xor $v0, $v0, $v0 xor $v1, $v1, $v1 addi $v1, $v1, 5 loop: addi $v0, $v0, 1 beq $v0, $v1, fin j loop fin: xor $v0, $v0, $v0 loop2: addi $v0, $v0, 1 bne $v0, $v1, loop2 j fin2 fin2: xor $v0, $v0, $v0
Route5GateScript: call EnableAutoTextBoxDrawing ld a, [wRoute5GateCurScript] ld hl, Route5GateScriptPointers jp JumpTable Route5GateScriptPointers: dw Route5GateScript0 dw Route5GateScript1 Route5GateScript_1df43: ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a jp ...
// Commodore 64 PRG executable file .file [name="inmem-const-array.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .const WHITE = 1 .const ...
; SMSQ QXL Host Module ; 2004-07-20 1.01 config items for drive letters (BC) include 'dev8_keys_sys' include 'dev8_smsq_smsq_ini_keys' include 'dev8_keys_stella_bl' include 'dev8_mac_config02' section host host bra.l jump ; $00 qxl_base dc.b $2b ; $04 dc.b 0,0,0 dc.l 0,0 ; $08 dc.l 0,0,0...
; These macrodefinitions are copied from linux sources ; Linux is written in C, so the definitions looked a bit ; different there. ; We could have just looked up their values and use ; them directly inright places ; However it would have made the code much less legible %define O_RDONLY 0 %define PROT_READ 0x1 %define ...
;/***************************************************************************** ;Filename : rmp_platform_crx_asm.s ;Author : pry ;Date : 10/04/2012 ;Description : The assembly part of the RMP RTOS. This is for Cortex-R4/5/7/8. ;*****************************************************************************...
#include "Mcu.inc" #include "FarCalls.inc" #include "Ui.inc" #include "TestFixture.inc" radix decimal NextStateWaitsForButtonPressTest code global testAct testAct: fcall pollUi return end
read_num: ;usage ;------ ; 1: create a variable num(word) ; 2: the input number is stored into num(word) section .bss temp_for_read: resb 1 section .text push rax ; push all push rbx push rcx mov word[num], 0 loop_read: ;; read a digit mov eax, 3 mov ebx, 0 mov ecx, temp_for_read mov edx, 1 ...
.macosx_version_min 10, 11 .section __TEXT,__text,regular,pure_instructions .align 4, 0x90 .globl _toto _toto: pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax incl (%eax) popl %ebp ret # ---------------------- .align 4, 0x90 .globl _tata _tata: pushl %ebp movl %...
data segment port dw 290h mes0 db 'Start.',0dh,0ah,'$' mes db 'Exit!$' data ends code segment assume cs:code,ds:data start: mov ax,data mov ds,ax lea dx,mes0 mov ah,09h int 21h mov cl,0 mov dx,port lp: mov al,cl out dx,al add cl,1 call key ...
; Copyright 2009-2012 Mersenne Research, Inc. All rights reserved ; Author: George Woltman ; Email: woltman@alum.mit.edu ; ; Assemble the radix-4/8 DJB FFT with delayed sin/cos multiplies. ; This is identical to the radix-4/8 DJB split premultiplier FFT ; except that the first levels use common sin/cos data and the l...
; ; VGMPlay ; ; VGM music file format player ; INCLUDE "Macros.asm" DEBUG: equ 0 GZIP_CRC32: equ 0 HEAP: equ 0C000H HEAP_SIZE: equ 1180H STACK_SIZE: equ 100H READBUFFER_SIZE: equ 0B00H org 100H RAM_PAGE0: ds 3F00H RAM_PAGE1: ds 4000H TPA: equ RAM_PAGE0 TPA_PAGE0: equ RAM_PAGE0 RAM_RESIDENT: equ RAM_PAGE0 TPA_PA...
;; Licensed to the .NET Foundation under one or more agreements. ;; The .NET Foundation licenses this file to you under the MIT license. ;; See the LICENSE file in the project root for more information. #include "AsmMacros.h" TEXTAREA ;; Allocate non-array, non-finalizable object. If the allocation doesn't f...
; x86_64 Linux bits 64 %define PAGESIZE 4096 %define carg1_rdi rdi %define carg2_rsi rsi %define carg3_rdx rdx %define carg4_rcx rcx %define carg5_r8 r8 %define carg6_r9 r9 %define cret1_rax rax ; Align procedure entry-points. %macro proc 1 align 16 %1 %endmacro ; Indirect jump, more efficiently. %macro jmp_...
; void bv_stack_clear_fastcall(bv_stack_t *s) SECTION code_adt_bv_stack PUBLIC _bv_stack_clear_fastcall defc _bv_stack_clear_fastcall = asm_bv_stack_clear INCLUDE "adt/bv_stack/z80/asm_bv_stack_clear.asm"
.386 .model flat, stdcall includelib msvcrt.lib printf PROTO C :dword, :vararg .data Xn dd 0 Numm dd 0 Numa dd 0 Numc dd 0 OutInt db '%d', 0ah, 0 .code start PROC mov EAX, 1 mov Xn, EAX ;seed mov EAX, 1 shl EAX, 31 mov Numm, EAX ;set m mov EAX, 1103515245 mov Numa, EAX ;set a mov EAX, 12345 ...
ForestMons: db $08 IF DEF(_RED) db 4,WEEDLE db 5,KAKUNA db 3,WEEDLE db 5,WEEDLE db 4,KAKUNA db 6,PIDGEY db 4,METAPOD db 3,CATERPIE ENDC IF DEF(_GREEN) db 4,CATERPIE db 5,METAPOD db 3,CATERPIE db 5,CATERPIE db 4,METAPOD db 6,PIDGEY db 4,KAKUNA db 3,WEEDLE ENDC IF DEF(_BLUE) db 4,W...
; int w_array_empty_fastcall(b_array_t *a) SECTION code_clib SECTION code_adt_w_array PUBLIC _w_array_empty_fastcall EXTERN asm_w_array_empty defc _w_array_empty_fastcall = asm_w_array_empty
;-------------------------------------------------------- ; File Created by SDCC : FreeWare ANSI-C Compiler ; Version 2.3.1 Wed Sep 04 21:56:17 2019 ;-------------------------------------------------------- .module printf ;-------------------------------------------------------- ; Public variables in this module ;-...
;; ;; Copyright (c) 2017-2021, 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...
MODULE __printf_handle_u SECTION code_clib PUBLIC __printf_handle_u EXTERN __printf_number __printf_handle_u: ld c,0 ;unsigned jp __printf_number
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: Spool Library FILE: libPrintControl.asm AUTHOR: Jim DeFrisco, 9 March 1990 ROUTINES: Name Description ---- ----------- SpoolGetPageSize g...
.data val: .word 0x12345678 0x456789ab .text main: la x1, val li x2, 0xDEADBABA li x3, 0x8BADF00D sw x2, 0(x1) sw x3, 4(x1) addi x1, x1, 8 sw x3, 0(x1) addi x1, x1, -8 lw x4, 0(x1) lw x5, 4(x1) lw x6, 8(x1) halt: beq x0, x0, halt
org 07c00h ; 告诉编译器程序加载到7c00处 mov ax, cs mov ds, ax mov es, ax call DispStr ; 调用显示字符串例程 jmp $ ; 无限循环 DispStr: mov ax, BootMessage mov bp, ax ; ES:BP = 串地址 mov cx, 16 ; CX = 串长度 mov ax, 01301h ; AH = 13, AL = 01h mov bx, 000...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Macros ; PRINTXY: .macro clc ldy #\1 ldx #\2 jsr $fff0 ; position x,y on text screen ldx #<\3 ldy #>\3 jsr Utils.sprint ; print text string .endm PRINTCHARXYA: .macro pha jsr $fff0 ; position x,y on text screen pla jsr $ffd2 ; print chara...
BITS 32 xor eax, eax ; zero eax push eax ; null terminate the string push 0x68732f2f ; push //sh (// is same as / for our purpose) push 0x6e69622f ; push /bin mov ebx, esp ; pass first argument using ebx push eax ; third argument is empty mov edx, esp push eax ; s...
[bits 16] stosb stosw stosd [bits 32] stosb stosw stosd [bits 64] stosb stosw stosd stosq
.text .syntax unified .eabi_attribute 67, "2.09" @ Tag_conformance .cpu arm7tdmi .eabi_attribute 6, 2 @ Tag_CPU_arch .eabi_attribute 8, 1 @ Tag_ARM_ISA_use .eabi_attribute 9, 1 @ Tag_THUMB_ISA_use .eabi_attribute 34, 0 @ Tag_CP...
; void p_list_clear(p_list_t *list) SECTION code_clib SECTION code_adt_p_list PUBLIC _p_list_clear EXTERN _p_list_init defc _p_list_clear = _p_list_init
dnl x86 mpn_mul_basecase -- Multiply two limb vectors and store the result dnl in a third limb vector. dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software dnl Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it an...
; GDT gdt_start: gdt_null: ;Mandatory null descriptor dd 0x0 ; 'dd' means define double word (4 bytes) dd 0x0 gdt_code: ; Code segment descriptor ; base=0x0, limit=0xfffff, ; 1st flags: (present)1 (priviledge) 00 (descriptor type)1 ->1001b ;Type flags: (code)1 (conforming)0 (readable)1 (accesse...
setrepeat 2 frame 0, 10 frame 1, 05 frame 2, 05 dorepeat 1 setrepeat 2 frame 0, 04 frame 3, 05 dorepeat 6 endanim
copyright zengfr site:http://github.com/zengfr/romhack 00177E clr.b ($17,A0) [123p+ 0] 001B20 clr.b ($bc,A0) [123p+ 0] 001D8C move.w #$101, (A0) [123p+ 84] 001D90 move.b #$15, ($3c,A0) [123p+ 0] 007CC4 move.b #$4, ($97,A0) [123p+ 0, enemy+ 0] 008138 bne $8140 [123p+ 0] 008536 ble $854e [123p...
.data x: .word -1 #armazenando o valor de "x" no formato . x = -1 y: .word 0 #armazenando o valor de "y" no formato . y = 0 .text lw $t0, x #carregar o valor de "x" para "f2" add $t1,$zero,32 # Armazenar 32 em t1 div $t0,$t1 # Dividir t0 por t1 mflo $t0 # pegar o restante e armazenar em t0 sw ...