content stringlengths 23 1.05M |
|---|
.EQU SWITCHPORT = 0x20 ;Input Ports
.EQU BUTTON_PORT = 0xFF ;
.EQU LED_PORT = 0x40 ;Output Ports
.EQU SEV_SEG_Cathodes = 0x81 ;
.EQU SEV_SEG_Anodes = 0x82 ;
.EQU Top_Counter = 0xBF ;
.EQU Mid_Counter = 0xFF ;
.EQU Lower_Counter = 0xFF ;
.EQU test1_mask = 0x01 ;
.EQU test2_mask = 0x02 ;
.EQU test3_mask ... |
; SYNTAX option "i":
; i Case insensitive instructions/directives (default = same case required)
; verify regular syntax works as expected with default options
jp Label1 : JP Label1 ; regular syntax - instruction
ex de,hl ; regular syntax - registers
align 4 : ALIGN 4 ... |
mov ah, 0x0e
; attempt 3
; Add the BIOS starting offset 0x7c00 to the memory address of the X
; and then dereference the contents of that pointer.
; We need the help of a different register 'bx' because 'mov al, [ax]' is illegal.
mov al, "3"
int 0x10
mov bx, the_secret
add bx, 0x7c00
mov al, [bx]
int 0x10
... |
OPTION DOTNAME
.text$ SEGMENT ALIGN(256) 'CODE'
ALIGN 32
__add_mod_384x384 PROC PRIVATE
DB 243,15,30,250
mov r8,QWORD PTR[rsi]
mov r9,QWORD PTR[8+rsi]
mov r10,QWORD PTR[16+rsi]
mov r11,QWORD PTR[24+rsi]
mov r12,QWORD PTR[32+rsi]
mov r13,QWORD PTR[40+rsi]
mov r14,QWORD PTR[48+rsi]
add r8,QWORD PTR[rdx]
mov ... |
SECTION smc_clib
PUBLIC cleararea
EXTERN pixeladdress
EXTERN leftbitmask, rightbitmask
;
; $Id: clrarea_arx.asm,v 1.3 2016-06-27 20:26:33 dom Exp $
;
; ***********************************************************************
;
; Clear specified graphics area in map.
;
; Design & programming by Gunther Str... |
Sound_46_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_46_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound_46_FM5, $00, $00
; FM5 Data
Sound_46_FM5:
smpsSetvoice $00
smpsModSet $05, $01, $1B, $37
dc.b nC5, $30
smpsStop
Sound_46_Voices:
; Voice... |
;Write a program to add two 16-bit numbers that are stored at $1000,$1001 and $1002,$1003
;and store the sum at $1010,$1011.
org $800
ldd $1000
addd $1002
std $1010
end |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: tsSmallCharClass.asm
AUTHOR: John Wedgwood, Nov 26, 1991
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Da... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: splineSuspend.asm
AUTHOR: Chris Boyke
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- ... |
; ===============================================================
; 2002
; ===============================================================
;
; uint16_t in_stick_sinclair2(void)
;
; Return joystick state in byte FGHIRLDU active high. The
; FGHI bits are fire buttons with "F" being primary.
;
; =======================... |
; -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
extern js_InternalThrow:PROC
extern PushAct... |
;This can be assembled with NASM, maybe YASM
section .text
bits 64
;See library.hpp and main.cpp for "how to call these functions" from C++ code
;Exported symbols for the resuting object file. These are then just labels below
global asm_is_windows, compute_answer, sum_4_ints, increment_pointer_int64
;This function r... |
; GDT
gdt_start:
gdt_null: ; The mandatory null descriptor
dd 0x0 ; 'dd' means define double word (i.e. 4 bytes)
dd 0x0
gdt_code: ; The code segment descriptor
; base=0x0, limit=0xfffff,
; 1st flags: (present)1 (privilege)00 (descriptor type)1 -> 1001b
; type flags: (code)1 (conforming)0 (raedable)1 ... |
.export puthex
.macpack generic
.include "utils/reg.inc"
.include "cbm_kernal.inc"
.code
; .a - byte with high order nibble zeroed
.proc printc
cmp #$a
bcc @number
clc
adc #'a'-10
bra @print
@number:
clc
adc #'0'
@print:
jsr CHROUT
rts
.endproc
.proc puthex
lda REG::r0
lsr
lsr
... |
;
; Small C+ Runtime Library
;
; CP/M functions
;
; CPM Plus "userf" custom Amstrad calls, for Amstrad CPC & PCW and ZX Spectrum +3
;
;
; $Id: a_driveb.asm,v 1.2 2017-01-02 20:06:48 aralbrec Exp $
;
SECTION code_clib
PUBLIC a_driveb
PUBLIC _a_driveb
EXTERN subuserf
INCLUDE "amstrad_... |
.ORIG x3800
.FILL STR1
.FILL STR2
.FILL STR3
.FILL STR4
.FILL STR5
.FILL STR6
.FILL STR7
.FILL STR1
.FILL STR2
.FILL STR3
.FILL STR4
.FILL STR5
.FILL STR6
.FILL STR7
.FILL STR1
.FILL STR2
.FILL STR3
.FILL STR4
.FILL STR5
.FILL STR6
.FILL STR7
.FILL STR1
.FILL STR2
.FILL STR3
.FILL STR4
.FILL... |
; =====================================================================
; 导入的函数或变量
; ---------------------------------------------------------------------
; 导入头文件
%include "asm_const.inc"
; 导入函数
extern ilinux_init ; 初始化一些事情,主要是改变GDT_PTR,让它指向新的GDT
extern ilinux_main ; 内核主函数
extern exception_handler ; 异常统一处... |
STDIN equ 0
STDOUT equ 1
SYS_EXIT equ 1
SYS_READ equ 3
SYS_WRITE equ 4
section .data
msg db "The largest digit is: "
len equ $- msg
num1 dd "57"
num2 dd "37"
num3 dd "97"
section .bss
largest resb 2
section .text
global main
main:
mov ecx, [num1]
cmp ecx, [num... |
DPLC_8F6DC: dc.w word_8F700-DPLC_8F6DC
dc.w word_8F704-DPLC_8F6DC
dc.w word_8F708-DPLC_8F6DC
dc.w word_8F70C-DPLC_8F6DC
dc.w word_8F710-DPLC_8F6DC
dc.w word_8F714-DPLC_8F6DC
dc.w word_8F718-DPLC_8F6DC
dc.w word_8F71C-DPLC_8F6DC
dc.w word_8F720-DPLC_8F6DC
dc.w word_8F724-DPLC_8F6DC
dc.w word_8F72A-D... |
#include once <u32tofreg.asm>
#include once <ftou32reg.asm>
#include once <stackf.asm>
; -------------------------------------------------------------
; Floating point library using the FP ROM Calculator (ZX 48K)
; All of them uses A EDCb registers as 1st paramter.
; For binary operators, the 2n operator must be push... |
global gdt_flush
gdt_flush:
mov eax, [esp+4] ; get address of gdt table
lgdt [eax] ; load it
jmp 0x08:.flush ; 0x08 is the offset to our code segment: Far jump! Update the segment register
.flush:
mov ax, 0x10 ; 0x10 points at the new data selector
mov ds, ax
mov es, ax
mov ... |
INCLUDE "constants/hardware.inc"
INCLUDE "constants/title.inc"
SECTION "Title Screen Scroll Position Table", ROM0
DEF CHANGE EQU (TITLE_SCROLL_END_POS - TITLE_SCROLL_START_POS) << 16
DEF START EQU TITLE_SCROLL_START_POS << 16
; Modified bounce ease-out
; Original formula from <http://robertpenner.com/easing/penner_e... |
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC sms_01_output_terminal_tty_z88dk_16_flags_toggle
sms_01_output_terminal_tty_z88dk_16_flags_toggle:
; toggle flag bits
; de = parameters *
ld a,(de)
xor (ix+25)
ld (ix+25),a
ret
|
COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: UserInterface/Vis
FILE: visUtilsResident.asm
ROUTINES:
Name Description
---- -----------
In Fixed resources:
-------------------
EXT V... |
; UTILS
; Random number (EAX: Max && Return Value)
random:
push ecx
push edx
mov ecx, eax
pusha
PDELTA STime
call [DELTA pGetSystemTime]
popa
xor eax, eax
mov ax, word ptr [DELTA STime.Milliseconds]
shl eax, 16
mov ax, word ptr [DELTA STime.Second]
xor edx, edx
div ecx
mov eax, edx
pop edx
pop ecx
ret
; Compare two st... |
SECTION code_clib
PUBLIC im1_init
PUBLIC _im1_init
im1_init:
_im1_init:
ld hl,0
ret
|
org $6000
opt zxnext
start: incbin "forth.bin"
savesna "forth.sna",start,$5BFE
|
;; x86 Interrupt Descriptor Table
global idt_flush
idt_flush:
;; Grab the address of IDTR from stack
mov eax, [esp + 4]
lidt [eax]
ret
;; Taken from JamesM, make life easier....
%macro ISR_NOERRCODE 1
global isr%1
isr%1:
cli
push 0
push %1
jmp isr_common_stub
%endmacro
%macro ISR_ERRCODE 1
global... |
;-------------------------------------------------------------------------------
; Praktikum SMD 2015
; M.Wahyudin (140310120031)
;
; Name : LATIH2.ASM
; Desc : Baca DIPSWITCH di P1, tampilkan ke P2 dan P3
; Input : DIPSWITCH di P1
; Output: LED P2 dan P3
;-------------------------------------------------------------... |
include Irvine32.inc
.data
bigEndianString BYTE "bigEndian: ", 0
littleEndianString BYTE "littleEndian: ", 0
bigEndian BYTE 089h, 0ABh, 0CDh, 0EFh
littleEndian DWORD ?
bigEndianVar DWORD ?
.code
main proc
mov al, bigEndian+0
mov ah, bigEndian+1
mov bl, bigEndian+2
mov bh, bigEndian+3
mov bigEndian+4, bh
mov... |
*** BEGIN CFG
Before Optimizations
==== file:///usr/local/google/home/vegorov/src/irhydra/irhydra/web/demos/dart/demo.dart_Vec2_get_len2
B0[graph]:2
B1[target]:0
CheckStackOverflow:4()
t0 <- LoadLocal:6(this)
PushArgument:8(t0)
t0 <- InstanceCall:10(get:x, t0 IC[1: Vec2 #1875 <0xf22117a1>])
PushArgu... |
# FILE: $File$
# AUTHOR: P. White
# CONTRIBUTORS: M. Reek, W. Carithers
# Alexander Kellermann Nieves
#
# DESCRIPTION:
# In this experiment, you will write some code in a pair of
# functions that are used to simplify a fraction.
#
# ARGUMENTS:
# None
#
# INPUT:
# The numerator and denominator of ... |
VictoryRoad3F_Script:
call VictoryRoad3Script_44996
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad3TrainerHeader0
ld de, VictoryRoad3F_ScriptPointers
ld a, [wVictoryRoad3FCurScript]
call ExecuteCurMapScriptInTable
ld [wVictoryRoad3FCurScript], a
ret
VictoryRoad3Script_44996:
ld hl, wCurrentMapScriptFlags
b... |
;-------------------------------------------------------------------------------
; posix/1b.nasm - routines described by "POSIX Realtime Extensions" (1003.1b).
;-------------------------------------------------------------------------------
module libc.posix1b
%include "errors.ah"
%include "locstor.ah"
%include "sync... |
; ********************** card list (count:32 size:256 bytes)
cards_list
dta a(card_give_gold_bishop)
dta a(card_give_gold_general)
dta a(card_give_gold_medic)
dta a(card_crime_rises_executioner)
dta a(card_crime_rises_stargazer)
dta a(card_crime_rises_treasurer)
dta a(card_luck_check_jester)
dta a(card_enemy_... |
global gen_interrupt
global install_idt
global install_gdt
global enable_interrupts
global clear_interrupts
global kernel_wait
global get_pdbr
global flush_tlb_entry
global flush_tlb
global read_port
global write_port
global read_port_word
global write_port_word
read_port:
mov edx, [esp + 4]
in al, dx
ret
write_po... |
; A133024: Divisors of 8128, the 4th perfect number.
; Submitted by Jon Maiga
; 1,2,4,8,16,32,64,127,254,508,1016,2032,4064,8128
mov $1,2
pow $1,$0
sub $0,7
mov $2,2
pow $2,$0
sub $1,$2
mov $0,$1
|
%include '../util.asm'
section .text
global _start
_start:
mov rdi, 1234567890
call printint
call endl
mov rdi, 123456789
call printint
call endl
mov rdi, 12345678
call printint
call endl
mov rdi, 1234567
call printint
call endl
mov rdi, 123456
call... |
<%
from pwnlib.shellcraft.arm.linux import syscall
%>
<%page args="fd, addr, length"/>
<%docstring>
Invokes the syscall getsockname. See 'man 2 getsockname' for more information.
Arguments:
fd(int): fd
addr(SOCKADDR_ARG): addr
len(socklen_t): len
</%docstring>
${syscall('SYS_getsockname', fd, ad... |
edit_hearts:
ld a,(player_hearts)
call get_heart_location
ld a,e
inc a
jr z,edit_hearts_start
ld (sheet_xy),de
edit_hearts_start:
ld hl,edit_hearts_functions
jp edit
edit_hearts_functions:
dw edit_hearts_blink_heart
dw edit_hearts_hid... |
global halving_sum
section .text
halving_sum:
xor rax, rax ; sum in rax
.next:
add rax, rdi ; add n(i)
sar rdi, 1 ; n(i+1) = n(i) div 2
jnz .next ; until n(i) == 0
ret |
\ VIA_B - ZolaDOS
\ Configuration for ZolaDOS mass storage system.
\ Uses 65C22 VIA B at address $A400
\ PORT A is used for 8-bit parallel data - bidirectional.
\ PORT B is used for control signals
\ These connect to a Raspberry Pi running the program zolados.
\ The VIA's timers are also reserved for use by ZolaDOS.
Z... |
.ORIG x3000
LD R1, Nx0001
LD R2, Nx0002
AND R4, R4, #0
LOOP AND R3, R0, R2
BRz ZERO
ADD R4, R4, R1
ZERO ADD R1, R1, R1
ADD R2, R2, R2
BRnp LOOP
AND R1, R0, R1
ADD R0, R4, R1
HALT
Nx0001 .FILL x0001
Nx0002 .FILL x0002
.END |
;
; Undrawbox
;
; Generic high resolution version
;
;
; $Id: w_undrawb.asm,v 1.1 2016-10-18 06:52:34 stefano Exp $
;
INCLUDE "graphics/grafix.inc"
SECTION code_clib
PUBLIC undrawb
PUBLIC _undrawb
EXTERN w_respixel
EXTERN w_line_r
EXTERN swapgfxbk
EXTERN swapgfxbk1
EXTERN __graphics_end
.undrawb
._undraw... |
; void *w_vector_back(b_vector_t *v)
SECTION code_clib
SECTION code_adt_w_vector
PUBLIC w_vector_back
EXTERN asm_w_vector_back
defc w_vector_back = asm_w_vector_back
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _w_vector_back
defc _w_vector_back = w_vector_back
ENDIF
|
INCLUDE "macros.asm"
INCLUDE "constants.asm"
INCLUDE "save/defaultsave.asm"
INCLUDE "save/rants.asm"
|
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC zx_01_output_char_64_proc_stack_window_32
EXTERN l_offset_ix_de
zx_01_output_char_64_proc_stack_window_32:
; create a 32-column equivalent window on the stack
;
; uses : f, bc, de, hl
ld hl,19
call l_offset_ix_de ; hl = & win... |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; .function draw-inline-array-instance-tie
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;BAD PROLOGUE
;; Warnings:
;; INFO: Flagged as asm by config
;; INFO: Assembly Function
# this is yet-another insane double-buffered DMA function.
#... |
TITLE Encryption Program (Encrypt.asm)
; This program uses MS-DOS function calls to
; read and encrypt a file. Run it from the
; command prompt, using redirection:
; Encrypt < infile.txt > outfile.txt
; Function 6 is also used for output, to avoid
; filtering ASCII control characters.
; Last u... |
BITS 64
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; put 2 into ecx for future load into xmm0
mov ecx, 2
cvtsi2ss xmm0, ecx
;TEST_BEGIN_RECORDING
cvttss2si ecx, xmm0
;TEST_END_RECORDING
xor ecx, ecx
cvtsi2sd xmm0, ecx
|
; ASM source file created by SevenuP v1.21
; SevenuP (C) Copyright 2002-2007 by Jaime Tejedor Gomez, aka Metalbrain
;GRAPHIC DATA:
;Pixel Size: ( 48, 16)
;Char Size: ( 6, 2)
;Sort Priorities: X char, Char line, Y char
;Data Outputted: Gfx
;Interleave: Column
;Mask: No
tile10:
DEFB 0... |
;
; The MIT License
;
; Copyright 2017 Anthony Campbell.
;
; 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... |
* = $1000
lda #>(continue - 1)
pha
lda #<(continue - 1)
pha
lda #$02
.byte $2c
continue
lda #$06
sta $d020
rts
|
.class assign:Obj
.method $constructor
.local x
load x
const 1
store x
load x
call Int:print
load x
load x
const 1
call Int:plus
store x
load x
call Int:print
pop
pop
pop
pop
return 0 |
;; TI File $Revision: /main/4 $
;; Checkin $Date: March 8, 2011 15:18:34 $
;;##########################################################################
;;
;;Title: Tables For IQmath Functions
;;
;;Version: 1.4
;;
;;Contents: IQsin and IQcos Function Table, Size Of Table = 644x16
;; IQdiv Function ... |
#a1: x, a2:y, a3: color
draw_pixel:
#werte auf stack speichern
addi sp, sp, -20
sw s0, 0(sp) #für relative position & später finale position
sw s1, 4(sp) #zum zwischenspeichern der display_adresse
sw a1, 8(sp)
sw a2, 12(sp)
sw a3, 16(sp)
#richtige zeile ermitteln
li s0, DISPLAY_WIDTH
mul s0, a2, s0
#stelle... |
.text
.globl main
main:
jal getCount
la $a1, intArray # Store the address of array in argument
move $a2, $v0 # Take the return value $v0 and move to argument.
jal getNumbers # get the numbers to use in the count.
jal newLine # Output a newLine
la $a1, intArray
jal displayNumbers # Show the content... |
obj/boot/boot.out: formato del fichero elf32-i386
Desensamblado de la sección .text:
00007c00 <start>:
start:
# FIRST PHASE: Register y operation mode setup.
# Assemble for 16-bit mode
.code16
cli
7c00: fa cli
# Set up the important data segment registers (DS, ES, ... |
%include "io.inc"
section .data
mystring db "This is my string", 10, 0
section .text
global CMAIN
CMAIN:
push ebp
lea ebp, [esp]
PRINT_STRING mystring
; TODO: call puts on string
push mystring
call puts
xor eax, eax
leave
ret
|
; int wv_priority_queue_shrink_to_fit_fastcall(wv_priority_queue_t *q)
SECTION code_adt_wv_priority_queue
PUBLIC _wv_priority_queue_shrink_to_fit_fastcall
defc _wv_priority_queue_shrink_to_fit_fastcall = asm_wv_priority_queue_shrink_to_fit
INCLUDE "adt/wv_priority_queue/z80/asm_wv_priority_queue_shrink_to_fit.asm"... |
.file "switch_eg.c"
.text
.globl switch_eg
.type switch_eg, @function
switch_eg:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movl %edi, -20(%rbp)
movl %esi, -24(%rbp)
movl -20(%rbp), %eax
movl %eax, -4(%rbp)
movl -24(%rbp), %eax
subl... |
ori $1, $0, 7
ori $2, $0, 7
ori $3, $0, 12
ori $4, $0, 6
sw $2, 0($0)
sw $2, 4($0)
sw $3, 8($0)
sw $1, 12($0)
sw $3, 16($0)
sw $1, 20($0)
sw $4, 24($0)
sw $3, 28($0)
sw $1, 32($0)
sw $2, 36($0)
sw $4, 40($0)
sw $3, 44($0)
sw $1, 48($0)
sw $3, 52($0)
sw $1, 56($0)
sw $2, 60($0)
sw $2, 64($0)
sw $3, 68($0)
sw $1, 72($0)
... |
; vim: ft=nasm ai
; TODO: uncompleted!
FDMEM0 equ 0x8000
HEADOFF equ 0x4400
DRV_NR equ 0x00
SAVCYLS equ 0xff0
org 0x100
[SECTION .text]
entry:
lea si, [msg_load]
call print
readkern:
lea dx, [sysfilepath]
mov ax, 0x3d02
int 0x21
jc error
mov bx, ax
mov cx, 0xfe00
lea dx, [buf]
mov ah, 0x3f
push bx
int... |
global thread_main
extern printf
%include "cabna/sys/iface.nasm"
%assign amount_tasks 503
%assign count 50_000_000
section .data
fmtstr: db `%li\n`,0
section .text
proc thread_main:
thread_main_race
mov ebx, amount_tasks
jmp_ret alloc_task
mov qword [arg1_rdi + task.need], 1
mov qword [arg1_rdi + t... |
@Assembly code to set x22 if 2<5
.main:
addi x20, x0, 2
addi x21, x0, 5
slt x22, x20, x21
.print x22
end |
;
; jsimdcpu.asm - SIMD instruction support check
;
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
; Copyright (C) 2016, D. R. Commander.
;
; Based on
; x86 SIMD extension for IJG JPEG library
; Copyright (C) 1999-2006, MIYASAKA Masaru.
; For conditions of distribution and use, see copyright notice in ... |
dnl x86 mpn_sec_tabselect.
dnl Copyright 2011 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 GNU Lesser General Public License as published by the Fre... |
.data
$char: .byte 'A' # caractere a ser impresso
.text
la $a0, $char # load address
li $v0, 4 # imprimir char ou string
syscall
li $v0,10
syscall
|
MOV A,#0xFF
ANL A,#0xFE
ANL A,#0xFD
ANL A,#0xFB
ANL A,#0xF7
ANL A,#0xEF
ANL A,#0xDF
ANL A,#0xBF
ANL A,#0x7F |
_Route2GateText_5d616::
text "The HM FLASH"
line "lights even the"
cont "darkest dungeons."
done
_Route2GateText2::
text "FLASH not only"
line "lights the way,"
cont "but can blind"
cont "#MON in battle"
cont "too!"
done
|
#Programmer: Mao Zunjie Student id: 18098531-i011-0019
#PART 1 Here is the original Code, and the improved version is in PART 2.
#the Program can be assembled and run directly now.
#parts of improved code comments are added on PART 2 and detailed explanation on Report.
#PART 1 ORIGINAL CODE
#.text
#main:
# li ... |
text__zoom SEGMENT para public 'CODE2'
ASSUME cs:text__zoom
LOCALS
.386
PUBLIC _zoom
_zoom PROC FAR
push bp
mov bp,sp
push si
push di
push ds
les di,[bp+6]
lds si,[bp+10]
mov ax,[bp+14]
call zoom
pop ds
pop di
pop si
pop bp
ret
_zoom ENDP
include zoomloop.inc
PUBLIC _sin... |
;print sum of even numbers from 0 to a given 2-digit number
section .data
msg1 : db 'Enter a 2-digit number : '
l1 : equ $-msg1
newline : db 10
section .bss
d1 : resb 1
d2 : resb 1
junk : resb 1
num1 : resb 1
count : resb 1
temp : resb 1
sum : resw 1
section .text
global _start:
_start:
mov eax, 4
mov ebx, 1... |
;---------------------------------------------------------------
; LOADING and SAVING stuff
;---------------------------------------------------------------
;.zp
;rleSource: .RES 2
;rleDestination: .RES 2
;.ram
;rleMode: .RES 1
;rleTokenLength: .RES 1
;rleToken: .RES 8
;rleTokenBuffer: .RES 8
;chunkCount: .RE... |
UnownFramesPointers:
dw UnownAFrames
dw UnownBFrames
dw UnownCFrames
dw UnownDFrames
dw UnownEFrames
dw UnownFFrames
dw UnownGFrames
dw UnownHFrames
dw UnownIFrames
dw UnownJFrames
dw UnownKFrames
dw UnownLFrames
dw UnownMFrames
dw UnownNFrames
dw UnownOFrames
dw UnownPFrames
dw UnownQFrames
dw UnownR... |
;
; MarkJ, by Murkry/IkX
;
;
;
; Well this idea was very klunky (;) hi dv8) until I received and
; dissassembled the F---- harry 3 virus. There I found that you could hook
; VxD functions (yay) using the QG manuver. Well this made this virus easier,
; the main difference between QG's are ... |
# Bitmap display starter code
#
# Bitmap Display Configuration:
# - Unit width in pixels: 4
# - Unit height in pixels: 4
# - Display width in pixels: 256
# - Display height in pixels: 256
# - Base Address for Display: 0x10008000 ($gp)
#
.eqv BASE_ADDRESS 0x10008000
.eqv SLEEP_TIME 40
.eqv WIDTH 64
.eqv SPEED 1
.eqv V... |
#include <iom32.h>
RSEG CODE
EXTERN k_curr_task
EXTERN k_next_task
PUBLIC port_int_disable
PUBLIC port_int_enable
PUBLIC port_cpsr_save
PUBLIC port_cpsr_restore
PUBLIC port_sched_start
PUBLIC port_irq_context_switch
PUBLIC port_context_switch
port_int_disable:
CLI
... |
page 60,132 ;AN000;
name _msgret ;AN000;
title C to Message Retriever ;AN000;
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
;-------------------------------------------------... |
; Copyright (c) 2020 Malik Enes Şafak
;
; 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, merge, publish,
; ... |
%ifndef _LD_M_MACROS_64_ASM_
%define _LD_M_MACROS_64_ASM_
;*****************************
;MACROS
;*****************************
%define _FRAMESTACKPOINTER_
%macro _enter_ 0
%ifdef _FRAMESTACKPOINTER_
push rbp
mov rbp, rsp
%endif
%endmacro
%macro _leave_ 0
%ifdef _FRAMESTACKPOINTER_
mov rsp, rbp
... |
# Read char and repeate it
SYS 1
STA A
LDA A
DUP
SYS 4
SYS 4
PUSH 10
SYS 4
POP
POP
POP
HLT
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Icon Editor
FILE: documentOptions.asm
AUTHOR: Steve Yegge, Apr 8, 1993
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
... |
ZoneMons1:
db $1E
IF DEF(_RED)
db 24,NIDORAN_M
db 26,DODUO
db 23,PONYTA
db 25,EXEGGCUTE
db 33,NIDORINO
db 23,EXEGGCUTE
db 24,NIDORAN_F
db 26,TAUROS
db 25,KANGASKHAN
db 28,KANGASKHAN
ENDC
IF DEF(_GREEN)
db 24,NIDORAN_M
db 26,DODUO
db 23,PONYTA
db 25,EXEGGCUTE
db 33,NIDORINO
db 23,EXEGGCUTE
db 24,NIDORA... |
#include "Mcu.inc"
#include "FarCalls.inc"
#include "Ui.inc"
#include "../../UiStates.inc"
#include "../../../Platform/PowerManagement/PowerManagementMocks.inc"
#include "TestFixture.inc"
radix decimal
EnsureFastClock code
global testArrange
testArrange:
fcall initialiseUi
fcall initialisePowerManagementMo... |
default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
section .text code align=64
EXTERN OPENSSL_ia32cap_P
global sha1_multi_block
ALIGN 32
sha1_multi_block:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_multi_block:
mov rdi,rcx
mov rsi,rdx
m... |
include "include/hUGE.inc"
SECTION "Song Data - Totaka", ROMX
totaka::
db 20
dw order_cnt
dw order1, order2, order3, order4
dw duty_instruments, wave_instruments, noise_instruments
dw routines
dw waves
order_cnt: db 2
order1: dw P0
order2: dw P1
order3: dw P2
order4: dw P3
P0:
dn C_5,1,$F24
dn C_5,1,$F08
dn D_5,... |
%define IFNDEF %ifndef
%define ENDIF %endif
IFNDEF foo
; bar
ENDIF
|
add $sp, $zero, $imm, 2048 # set $sp = 2048
lw $a0, $zero, $imm, 1024 # get x from address 1024
jal $imm, $zero, $zero, fib # calc $v0 = fib(x)
sw $v0, $zero, $imm, 1025 # store fib(x) in 1025
halt $zero, $zero, $zero, 0 # halt
fib:
add $sp, $sp, $imm, -3 # adjust stack for 3 items
sw $s0, $sp, $imm, 2 # save ... |
mul $a0, $a1, 2
mul $a0, $a1, 4
mul $a0, $a1, 8
mul $a0, $a1, 16
mul $a0, $a1, 32
mul $a0, $a1, 64
mul $a0, $a1, 128
mul $a0, $a1, 256
mul $a0, $a1, 512
mul $a0, $a1, 1024
mul $a0, $a1, 2048
mul $a0, $a1, 4096 |
SECTION code_fp_am9511
PUBLIC _sqr_fastcall
EXTERN asm_am9511_sqr_fastcall
defc _sqr_fastcall = asm_am9511_sqr_fastcall
|
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_stdio
PUBLIC __stdio_verify_valid
EXTERN __p_forward_list_locate_item, error_ebadf_mc
EXTERN __stdio_open_file_list
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $04
EXTERN __stdio_lock_file_list, __stdio_unlock_file_list
ENDIF
;;;;;;;;;;;... |
MACRO
FuncStub $name
AREA |.drectve|, DRECTVE
DCB "/EXPORT:$name "
AREA |.text|,CODE,READONLY
IMPORT addr$name
EXPORT $name
$name PROC
#ifdef _M_ARM64
adrp x16, addr$name
ldr x16, [x16, addr$name]
br x16
#else
mov32 r12, addr$name
ldr pc, [r12]
#endif
ENDP
MEND
; dinput8
FuncStub DirectInput8Create... |
DrainHPEffect_:
ld hl, wDamage
ld a, [hl]
srl a ; divide damage by 2
ld [hli], a
ld a, [hl]
rr a
ld [hld], a
or [hl] ; is damage 0?
jr nz, .getAttackerHP
; if damage is 0, increase to 1 so that the attacker gains at least 1 HP
inc hl
inc [hl]
.getAttackerHP
ld hl, wBattleMonHP
ld de, wBattleMonMaxHP
ldh a... |
; bool cpuid(uint32_t level, uint32_t sublevel, uint32_t result[4])
section .text
global cpuid
cpuid:
push ebx
push edi
; load our query into eax and ecx, and zero out the result registers
mov eax, [esp+12]
mov ecx, [esp+16]
mov edi, [esp+20]
xor ebx, ebx
xor edx, edx
cpuid
... |
; Original address was $B0C4
; "Unused Level 13"
.word $0000 ; Alternate level layout
.word $0000 ; Alternate object layout
.byte LEVEL1_SIZE_04 | LEVEL1_YSTART_170
.byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18 | LEVEL2_UNUSEDFLAG
.byte LEVEL3_TILESET_04 | LEVEL3_VSCROLL_LOCKLOW
.byte LEVEL4_BGBANK_... |
# first make sure li is working correctly, then check li on floats
li x1, 123
outr x1
li x1, 2000
outr x1
addi x1, x0, 1000
outr x1
# this will produce a very postive output, since we are printing unsigned
addi x1, x0, -1000
outr x1
addi x1, x0, 2000
outr x1
# this will produce a very postive output, since we are pri... |
FuchsiaGym_Script:
call FuchsiaGymScript_75453
call EnableAutoTextBoxDrawing
ld hl, FuchsiaGymTrainerHeader0
ld de, FuchsiaGym_ScriptPointers
ld a, [wFuchsiaGymCurScript]
call ExecuteCurMapScriptInTable
ld [wFuchsiaGymCurScript], a
ret
FuchsiaGymScript_75453:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6,... |
.byte $01 ; Unknown purpose
.byte OBJ_REDTROOPA, $12, $19
.byte OBJ_LAKITU, $56, $12
.byte OBJ_ENDLEVELCARD, $68, $15
.byte $FF ; Terminator
|
%ifndef CORE_ASM
%define CORE_ASM
extern Sleep
extern Beep
%macro sleep 1
; %macro sleep 0-1 500
;;; sleep(dur=500)
;;push eax
push ecx
push edx
push DWORD %1 ; dur milis
call Sleep ; eax = if err
pop edx
pop ecx
;;pop eax
%endmacro
%macro beep 2
;;; console.beep(freq, dur=500)
;;; beeps in freq(arg0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.