content
stringlengths
23
1.05M
;Assume that the INT1 pin is connected to a switch that is normally high. ;Whenever it goes low, it should turn on an LED. The LED is connected to P1.3 and is normally off. ;As long as the switch is pressed low, ;the LED should stay on. Simultaneously perform a toggle operation in P1.5 with the delay of 500ms. ORG ...
SECTION .text GLOBAL square_curve25519 square_curve25519: sub rsp, 0x28 imul rax, [ rsi + 0x20 ], 0x13; x1 <- arg1[4] * 0x13 mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx mulx r10, r11, [ rsi + 0x0 ]; x38, x37<- arg1[0] * arg1[0] imul rdx, rax, 0x2; x2 <- x1 * 0x2 imul rcx, [ rsi + 0x18 ], 0x13; x4 <- arg1[3] * 0x13 mulx r8,...
ps_3_0 def c0, 1, 0, 2, 0 dcl_texcoord v0.xy dcl_texcoord1 v1.zw mad oC0, v0.xxxy, c0.xyyx, c0.yyxy mad oC1, v0.xxxy, c0.yyxx, c0.yxyy mad oC2, v0.x, c0.yyyx, c0.yxzy mov oC3.xy, v0.xy mov oC3.zw, v1.xy
; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX ; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO ; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS ; IN USING, DIS...
; NFA/SFA driver versions V1.00 (c) W. Lenerz, 2012 section nfa xdef nfa_vers nfa_vers dc.w 4,'1.00' end
;exp3-1 loop实现方法 DATAS SEGMENT ;此处输入数据段代码 DATAS ENDS STACKS SEGMENT ;此处输入堆栈段代码 STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: mov AX,DATAS mov DS,AX ;此处输入代码段代码 mov DL, 10 mov CX, 15 process1: ;外层循环 push CX mov CX, 16 process2: ;内层循环 mov AH, 02H ...
ins1 KP_OSCV $90,0,1,0,$00 KP_OSCV $C8,0,1,0,$00 KP_OSCV $B4,0,1,0,$00 KP_OSCV $84,0,1,0,$00 KP_OSCV $7C,0,1,0,$00 KP_OSCV $A4,0,1,0,$00 ins1loop KP_OSCV $74,0,0,0,$00 KP_OSCJ [ins1loop-ins1] vol1 KP_VOLV $08,$05 vol1loop KP_VOLV $00,$00 KP_VOLJ [vol1loop-vol1] ins2 KP_OSCV $5C,0,1,0,$00 KP_OSCV $44,0,1,0...
; This is a very simple mutex implementation. A mutex object is a 32-bit ; integer in memory (for performance it should be aligned and in its own cache ; line). Zero means "locked" and one means "unlocked" (so that xor can be used ; to setup the "locked" value). ; TODO: The interface must be the same across the oth...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1994 -- All Rights Reserved PROJECT: Condo viewer MODULE: context controller FILE: ctxtcontrolManager.asm AUTHOR: Jonathan Magasin, Jun 15, 1994 ROUTINES: Name Description ---- ----------- ...
; ; USER4.ASM ; More Win16 USER thunks ; ; History: ; ; Created 25-Jan-1991 by Jeff Parsons (jeffpar) ; Added Win 31 thunks 22nd-March-1992 by Chandan S. Chauhan (ChandanC) ; Split off from USER2.ASM 4-Dec-92 by barryb ; Split off from USER3.ASM 26-May-93 by bobday ; ;-- TITLE USER4.AS...
SECTION code_fcntl PUBLIC console_01_input_stdio_msg_ictl PUBLIC console_01_input_stdio_msg_ictl_0 EXTERN asm_vioctl_driver, error_einval_zc EXTERN l_offset_ix_de, l_setmem_hl EXTERN console_01_input_stdio_msg_flsh console_01_input_stdio_msg_ictl: ; ioctl messages understood: ; ; defc IOCTL_ITERM_RESET ...
; ############################################################################ ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## ; ## ## ; ## Released under the terms of the WDOSX license agreement. ## ; ##...
Name: kart-bg-p.asm Type: file Size: 17694 Last-Modified: '1992-08-06T06:36:06Z' SHA-1: 341A00E2392B46A91FB5249CFC847F89F27DF2B3 Description: null
PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp" FontGraphics:: INCBIN "gfx/font/font.1bpp" FontGraphicsEnd:: ABTiles: INCBIN "gfx/font/AB.2bpp" HpBarAndStatusGraphics:: INCBIN "gfx/font/font_battle_extra.2bpp" HpBarAndStatusGraphicsEnd:: BattleHudTiles1: INCBIN "gfx/battle/battle_hud_1.1bpp" BattleHudTiles...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .global display_num, display_char, newline .global plus, minus, multiply, divide, rand32, rand_bounded .global add1, sub1, id, eq? .global greater, greater_eq, smaller, smaller_eq .global bool_not, bool_and, bool_or .global type_exception, value_exception, car_exception ....
; ; $Id: 0x36.asm,v 1.1.1.1 2016/03/27 08:40:13 raptor Exp $ ; ; 0x36 explanation - from xchg rax,rax by xorpd@xorpd.net ; Copyright (c) 2016 Marco Ivaldi <raptor@0xdeadbeef.info> ; ; For positive integer values of rax, this snippet ; calculates the next power of two, using a pretty cool ; technique. ; ; This analysis...
@256 D=A @SP M=D @300 D=A @LCL M=D @400 D=A @ARG M=D @3000 D=A @THIS M=D @3010 D=A @THAT M=D @17 D=A @SP A=M M=D @SP M=M+1 @17 D=A @SP A=M M=D @SP M=M+1 @SP M=M-1 A=M D=M @R13 M=D @SP M=M-1 A=M D=M @R13 A=M D=D-A @FALSE.0 D;JNE D=-1 @ENDTEST.0 0;JMP (FALSE.0) D=0 (ENDTEST.0) @SP A=M M=D @SP M=M+1 @17 D=A @SP A=M M=D @S...
; A063542: Least number of empty convex quadrilaterals (4-gons) determined by n points in the plane. ; 0,1,3,6,10,15,23,32,42,51 mov $5,$0 mov $6,$0 lpb $5 mov $0,$6 mov $3,0 mov $4,0 sub $5,1 sub $0,$5 lpb $0 mov $2,$0 seq $2,94328 ; Iterate the map in A006369 starting at 4. add $4,$0 sub ...
.title 'Preliminary Z80 tests' ; prelim.z80 - Preliminary Z80 tests ; Copyright (C) 1994 Frank D. Cringle ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either version 2 ; of the License, ...
;; Hungarian Notation Reference ;; https://www.cse.iitk.ac.in/users/dsrkg/cs245/html/Guide.htm %assign Main.CodeSize 8192 %assign Main.LoadAddress 0x7e00 %include "proc.asm" %include "bootloader.asm" %include "mandelbrot.asm" %include "mouse.asm" %include "graphics.asm" times Main.CodeSize - ($ - $$) db 0
; void zxn_write_sysvar_bank_state(unsigned int state) SECTION code_clib SECTION code_arch PUBLIC zxn_write_sysvar_bank_state EXTERN asm_zxn_write_sysvar_bank_state defc zxn_write_sysvar_bank_state = asm_zxn_write_sysvar_bank_state ; SDCC bridge for Classic IF __CLASSIC PUBLIC _zxn_write_sysvar_bank_state defc _zx...
; ; file: read.asm ; This subroutine reads an array of doubles from a file segment .data format db "%lf", 0 ; format for fscanf() segment .bss segment .text global read_doubles extern fscanf %define SIZEOF_DOUBLE 8 %define FP dword [ebp + 8] %define ARRAYP ...
[bits 32] [extern k_main] ; Calls the main function of our C kernel call k_main jmp $
ori $ra,$ra,0xf mfhi $4 addu $3,$5,$3 mtlo $5 lui $1,33268 addiu $1,$1,-9982 mflo $2 mthi $3 mthi $1 mthi $5 sll $1,$2,11 mflo $6 mflo $1 divu $6,$ra addu $5,$2,$5 sb $5,12($0) multu $4,$6 ori $1,$0,28309 srav $6,$0,$3 addiu $2,$5,-20918 div $6,$ra multu $4,$2 multu $5,$5 div $4,$ra mfhi $4 mthi $5 sb $5,11($0) mfhi $1...
; Main.asm file generated by New Project wizard ; ; Created: Fri May 28 2021 ; Processor: 8086 ; Compiler: MASM32 ; ; Before starting simulation set Internal Memory Size ; in the 8086 model properties to 0x10000 ;==================================================================== DATA SEGMENT P_A EQU...
extern m7_ippsAES_CMACGetSize:function extern n8_ippsAES_CMACGetSize:function extern y8_ippsAES_CMACGetSize:function extern e9_ippsAES_CMACGetSize:function extern l9_ippsAES_CMACGetSize:function extern n0_ippsAES_CMACGetSize:function extern k0_ippsAES_CMACGetSize:function extern ippcpJumpIndexForMergedLibs extern ippcp...
; void *p_forward_list_next_fastcall(void *item) SECTION code_clib SECTION code_adt_p_forward_list PUBLIC _p_forward_list_next_fastcall EXTERN asm_p_forward_list_next defc _p_forward_list_next_fastcall = asm_p_forward_list_next
; Test to prevent a corner case reported by jltursan org #4000 di ld sp,hl ; 7 pop de ; 11 fetch sine pop bc ; 11 fetch cosine ld sp,ix pop hl pop hl add hl,de push hl ; mdl:no-opt pop hl pop hl add hl,bc push hl ei loop: jr loop
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GlobalPC 1998 -- All Rights Reserved PROJECT: PC GEOS MODULE: Video Drivers FILE: vga16Raster.asm AUTHOR: Jim DeFrisco, Oct 8, 1992 ROUTINES: Name Description ---- ----------- REVISION HISTORY: ...
;************************************************************************** ;* ;* FILE via_wrap2.asm ;* Copyright (c) 2009 Daniel Kahlin <daniel@kahlin.net> ;* Written by Daniel Kahlin <daniel@kahlin.net> ;* ;* DESCRIPTION ;* Test case for via timer wrap around. ;* ;****** processor 6502 include "macros.i" SCR_B...
; void *adt_QueuePopFront(struct adt_Queue *q) ; 09.2005 aralbrec SECTION code_clib PUBLIC adt_QueuePopFront PUBLIC _adt_QueuePopFront EXTERN _u_free ; enter: HL = struct adt_Queue * ; exit : HL = top item, item removed from queue ; = 0 and carry reset if queue empty .adt_QueuePopFront ._adt_QueuePopFront ...
## Program to show the number 42. MOV 42,A ## 052a SHW A ## 0a HLT ## ff ##0x05, 0x2a, 0x0a, 0xff
;=============================================================================== ; MODE - Display and/or modify device configuration ; ;=============================================================================== ; ; Author: Wayne Warthen (wwarthen@gmail.com) ;_________________________________________________...
; apple2enh audio.asm .import _InitializeMusicEngine .export _InitializeAudio .export _SoundKillAll .exportzp Voice1ControlCache .include "apple2.asm" .segment "ZEROPAGE" Voice1ControlCache: .res 1 .segment "CODE" ;------------------------------------------------------------------ _InitializeAudio: Initialize...
; prints text for bookshelves in buildings without sign events PrintBookshelfText: ld a, [wPlayerFacingDirection] ; player's sprite facing direction cp SPRITE_FACING_UP jr nz, .noMatch ; facing up ld a, [wCurMapTileset] ld b, a aCoord 8, 7 ld c, a ld hl, BookshelfTileIDs .loop ld a, [hli] cp $ff jr z, .noMat...
db MAGNETON ; pokedex id db 50 ; base hp db 60 ; base attack db 95 ; base defense db 70 ; base speed db 120 ; base special db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 60 ; catch rate db 161 ; base exp yield INCBIN "pic/gsmon/magneton.pic",0,1 ; 66, sprite dimensions dw MagnetonPicFront dw MagnetonPicBa...
SECTION code_compiler GLOBAL _dyncode_full_romcall GLOBAL _dyncode_romcall GLOBAL _dyncode_preserve_ix GLOBAL _dyncode_quick GLOBAL _exit_msg GLOBAL _find_sp_for_basic _exit_msg: ld sp, ($5C3D) pop bc push de ld hl,$0000 ; prepare to clear some system variables. ld ($5c0b),hl ; blank DEFADD t...
Name: ys_w58.asm Type: file Size: 34140 Last-Modified: '2016-05-13T04:51:45Z' SHA-1: 17234674A25FBDF33BA013EA88B60C627700DA2A Description: null
; ::: include #ruledef test { ld {x: u8} => 0x55 @ x } ; ::: ld 0 ; = 0x5500 ; ::: ld 12 ; = 0x550c ; ::: ld 6 * 2 ; = 0x550c ; ::: ld 0xc ; = 0x550c ; ::: ld 0xff ; = 0x55ff ; ::: ld 255 ; = 0x55ff ; ::: ld 0x001 ; = 0x5501 ; ::: x = 0xff ld x ; = 0x55ff ; ::: ld x ; = 0x55ff x = 0xff ; ::: ld 0x123 ; error: out...
DB __COUNTER__ ; DB 0 LUA ALLPASS sj.insert_label("label_" .. sj.get_define("__COUNTER__"), sj.current_address) -- creates "label_1" at "$" (0x0001) sj.insert_label("label_" .. sj.get_define("__COUNTER__"), _c("$+10")) -- creates "label_2" at "$+10" (0x000B) ...
calign 16 MainHash_Probe: ; in: rcx key ; out: rax address of entry ; rdx edx == -1 if found ; edx == 0 if not found ; rcx entry (8 bytes) ;ProfileInc MainHash_Probe mov eax, dword[mainHash.clusterCount] mul ecx shl rdx, 5 ...
SECTION "sec", ROM0 X0 EQUS "0" m: MACRO \1 EQUS STRCAT("{X\2}", "+0") ENDM n = 0 REPT $7E n1 = n + 1 NSTR EQUS STRSUB("{n}", 2, STRLEN("{n}") - 1) N1STR EQUS STRSUB("{n1}", 2, STRLEN("{n1}") - 1) XN1 EQUS STRCAT("X", "{N1STR}") m XN1, {NSTR} PURGE NSTR, N1STR, XN1 n = n + 1 ENDR ; string of 127 zeros sepa...
page , 132 ;*****************************************************************************; ; ; ; FILENAME: vcpitst.asm ; ; ; ; CONTENTS: VCPI detection and management routines test ; ; ; ; Author: Jean-Francois Larvoire 94/01/18 ; ; ; ; Us...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Executable name : sandbox ; Version: 1.0 ; Created date: 21.01.2018 ; Last update: 21.01.2018 ; Author : @$#1247 ; Description: A simple program for change lowercase into uppercase in assembly for Linux, using NASM ; 2.13.01, demon...
; unsigned char esx_f_getcwd(unsigned char *buf) SECTION code_esxdos PUBLIC esx_f_getcwd EXTERN asm_esx_f_getcwd defc esx_f_getcwd = asm_esx_f_getcwd ; SDCC bridge for Classic IF __CLASSIC PUBLIC _esx_f_getcwd defc _esx_f_getcwd = esx_f_getcwd ENDIF
.MODEL SMALL .STACK 100 .DATA byte1 DB 10, 20, 30 array1 DW 30 DUP(?), 0, 0 array2 DW 5 DUP(3 DUP(?)) array3 DW 1,2,3,4 digitStr DB 12345678$" .CODE MAIN PROC MOV AX,@DATA MOV DS,AX MOV DX, LENGTHOF byte1 MOV AX,4C00H INT 21H MAIN ENDP END MAIN
Name: ys_chip3.asm Type: file Size: 129558 Last-Modified: '2016-05-13T04:51:40Z' SHA-1: 22EC285406BE15BC1A9D12C7636C7BBE17A78151 Description: null
%define BPM 100 %define INCLUDE_DELAY_MODULATION %include "../src/sointu.inc" BEGIN_PATTERNS PATTERN 80, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0 END_PATTERNS BEGIN_TRACKS TRACK VOICES(1),0 END_TRACKS BEGIN_PATCH BEGIN_INSTRUMENT VOICES(1) ; Instrument0 SU_ENVELOPE MONO,AT...
lda {m1}+2 sta {m1} lda {m1}+3 sta {m1}+1 lda #0 sta {m1}+2 sta {m1}+3
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: tlSmallFlags.asm AUTHOR: John Wedgwood, Dec 26, 1991 ROUTINES: Name Description ---- ----------- SmallLineAlterFlags Alter flags f...
PUBLIC asm_rot_encrypt .386 .model flat, c .data key BYTE -2, 4, 1, 0, 3, 5, 2, 4, 4, 6 .code ;-------------------------------------------------------- asm_rot_encrypt PROC ; ; Encrypts a null terminated string of any length ; by rotating every charachter in it according to the ; key above. ; ; Receives: ; pointe...
;代码段选择子,第二个GDT表项 SEL_KERN_CODE EQU 0x8 ;第三个 SEL_KERN_DATA EQU 0x10 [bits 32] [section .text] [extern os_main] [global start] start: xor eax, eax mov ax, SEL_KERN_DATA mov ds, ax mov es, ax mov ss, ax mov fs, ax mov gs, ax ;为了后面。需要把堆栈设置在4M的地方 m...
Name: ys_w46.asm Type: file Size: 19210 Last-Modified: '2016-05-13T04:50:34Z' SHA-1: 549D4C6981C04E3EBE94CE3F37074A9029F887D1 Description: null
RRA ADDAC RES0D SET4mHL LDDmHL BIT3L LDED ADCAD RES2D ORH LDEC XORA INCL RES7C LDmHLH INCL RLCmHL LDEL LDEC BIT0L SET0mHL LDCA LDBC RES4L RLL RES1H SCF LDEmHL SRAL RES4mHL LDHD RES4A SRAmHL RRCC SET4mHL BIT5D LDmHLL BIT2C RES7H XORE DECA LDLL ANDL ORn LDDE ADDAn ADCAL ADCA...
dnl AMD K6-2 mpn_com -- mpn bitwise one's complement. dnl Copyright 1999, 2000, 2001, 2002 Free Software 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 and/or dnl modify it under the terms of the GNU Lesser General Public Lice...
# end of rounds ################# # # feedforward: ctx->X[i] = X[i] ^ w[i], {i=0..15} movq %rdx,X_stk+8*o1K_rdx(%rsp) #we need a register. x6 already on stack movq ctxPtr(%rsp),%rdx .irp _rr_,rdi,rsi,rbp,rax,rcx,rbx,r8,r9,r10,r11,r12,r13,r14,r15 #do all but x6,x7 _oo_ = o1...
; ; OZ-7xx DK emulation layer for Z88DK ; by Stefano Bodrato - Oct. 2003 ; ; int ozpoint(int x, int y, byte color); ; ; ------ ; $Id: ozpoint.asm,v 1.3 2016-06-28 14:48:17 dom Exp $ ; SECTION code_clib PUBLIC ozpoint PUBLIC _ozpoint EXTERN swapgfxbk EXTERN __oz_gfxend EXTERN oz...
; ; Invoke a GSX/GIOS function with a single parameter in "intin" ; ; ; $Id: gios_1pm.asm $ ; SECTION code_clib PUBLIC gios_1pm PUBLIC _gios_1pm EXTERN ASMDISP_GIOS_1PM EXTERN gios_1pm_callee gios_1pm: _gios_1pm: pop af pop de pop bc push bc push de push af jp gios_1pm_callee + ASMDISP_G...
<?xml version = '1.0' encoding = 'ISO-8859-1' ?> <asm version="1.0" name="0"> <cp> <constant value="Probe2Fiware"/> <constant value="links"/> <constant value="NTransientLinkSet;"/> <constant value="col"/> <constant value="J"/> <constant value="main"/> <constant value="A"/> <constant value="Oc...
.include "m8def.inc" .def temp1 = r17 ldi temp1, LOW(RAMEND) ; Stack-Pointer initialisieren out SPL, temp1 ldi temp1, HIGH(RAMEND) out SPH, temp1 ldi r16, $FF out DDRB, r16 ; ldi r16, $00 ; out DDRD, r16 loop: ldi r16, 0b00001001 ; 4+1 out PORTB, r16 rcall Pause ldi r16, 0b...
; ************************ ; CHANNEL 1 ; ************************ Music_A_ParseNotes: ; check note duration ld a, [w_ch1_duration] and a jp z, .read ; jump if == 0 dec a ld [w_ch1_duration], a jp .end ; => return .read ; store so that ; de contains the current address ld a, [w_ch1_address+1] ld d, ...
.386p descr struc limit dw 0 base_l dw 0 base_m db 0 attr_1 db 0 attr_2 db 0 base_h db 0 descr ends idescr struc offs_l dw 0 sel dw 0 cntr db 0 attr db 0 offs_h dw 0 idescr ends stack32 segment para stack 'STACK' stack_start db 100h dup(?) s...
; QXL SMSQ BEEP emulation  1988 Tony Tebby QJUMP section sms xdef hdop_beep xdef hdop_bpof xref qxl_mess_add include 'dev8_keys_sys' include 'dev8_keys_err' include 'dev8_smsq_qxl_keys' include 'dev8_smsq_qxl_comm_keys' ho.bpoff equ 1098 ; beep 0 ho.bpscl equ 14585-ho.bpoff ; beep 128 - beep 0 h...
;basic sanity check with a few external calls ;extern __getmainargs section .text global main main: mov rax, 20 add rax, rcx cmp rax, 80 je success1 jmp fail global success1 success1: add rax, rdx cmp rax, 90 je success2 jmp fail success2: mul rax global fail fail: ;basic blocks 6-9 xor RCX...
;Jogo da Memoria org 0x7E00 jmp 0x0000:start data: titulo db 'JOGUITO DA MEMORIA', 0 play db 'Play', 0 help db 'Help', 0 cred db 'Creditos', 0 n1 db 'Felipe Nunes (fnap)', 0 n2 db 'Marcelo Victor (mvbs3)', 0 n3 db 'Maria Luisa Lima (mlll)', 0 arrow db '>', 0 l1 db 'Digite um numero de 0-9 para selecionar uma carta e pr...
.MODEL small .STACK .DATA N db 4h num db 01h,02h,03h,04h .CODE .STARTUP mov cx,00h mov cl,N mov bx,offset num addition: add al,[bx] inc bx loop addition .EXIT END
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: Text Library FILE: uiGuideControl.asm ROUTINES: Name Description ---- ----------- GLB RulerGuideControlClass Style menu object REVISIO...
org 0 ; Preset values %define BYTES_PER_SECTOR 512 %define VERSION_STRING "0.2.1" ;; Memory Map: ;; 0x0000:7C00 - 0x0000:0x7C00 + 512 : Bootloader ;; 0x2000:0x0 - 0x2000:0xFFFF : Kernel Space ;; 0x3000:0x0 - 0x3000:0xFFFF : CHIP4504 Program Space ;; 0x4000:0x0 - 0x4000:0xFFFF : Kernel Stack Space [SECTION .text] ;;;;;...
.intel_syntax noprefix include "inc\example.inc" %include "bla" #region Nasm has local labels when prefixed with a dot ####################################################### global_label1: .loop: jne .loop ret jmp dword ptr global_label2: .loop: jne .loop jae global_label1.loop re...
SECTION .text global crcCalc align 10h crcCalc: push rbx push rdi push rsi mov rsi, rcx ; Load the pointer to dwCrc32 mov ecx, [rsi] ; Dereference the pointer to load dwCrc32 xor rbx, rbx lea rdi, [r8 + r9] ; Calculate the end of the buffer crc32loop: xor rax, rax ; Clear the ea...
ORG 100 LDA HEAD STA CUR LDA LENV STA N CICLO, LDA CUR I // MIN CMA INC ADD MIN SPA BUN AFTMIN LDA CUR I STA MIN AFTMIN, SZE BUN CHECK BUN SMAX CHECK, LDA CUR I STA MIN SMAX, CLA CLE LDA CUR I CMA INC ADD MAX SNA BUN AFTMAX LDA CUR I STA MAX AFTMAX, SZE BUN CHECK BUN NEXT CHECK, LDA CUR I STA MAX NEXT, LDA CUR ...
.seg data ._osCall_impl: .data, <qw> 0 .seg code ._osCall: push, rbp mov, rbp, rsp sub, rsp, 32 call, qwordptr ._osCall_impl mov, rsp, rbp pop, rbp ret .seg code ._print: mov, rdx, rcx mov, rcx, 1 call, ._osCall ret
; ;====================================================================== ; I/O BIT DRIVER FOR CONSOLE BELL FOR SBC V2 USING BIT 0 OF RTC DRIVER ;====================================================================== ; SPK_INIT: CALL NEWLINE ; FORMATTING PRTS("SPK: IO=0x$") LD A,DSRTC_BASE CALL PRTHEXBYT...
org 07c00h mov ax,cs mov ds,ax mov es,ax call DispStr jmp $ DispStr: mov ax,BootMessage mov bp,ax mov cx,16 mov ax,01301h mov bx,000ch mov dl,0 int 10h ret BootMessage: db 'Hello, OS World' times 510-($-$$) db 0; dw 0xaa55;
;***************************************************************************** ;* DRVRAST.ASM - set_rast, and xor_to/from_ram functions for the vesa driver. ;* ;* NOTES: ;* These functions are lumped together here because they all ;* process an entire raster using bank-at-a-time logic instead ;* of the usual ...
sll $3,$3,0 srav $1,$4,$3 srl $0,$1,8 slt $2,$2,$3 lw $4,4($0) lb $1,3($0) xori $0,$0,41446 xori $1,$1,40928 srav $5,$4,$3 xori $4,$4,62477 slt $4,$4,$3 ori $6,$4,31892 lhu $3,10($0) srlv $5,$4,$3 slti $1,$4,24661 andi $6,$3,5053 sw $5,12($0) and $6,$3,$3 lw $5,8($0) nor $1,$1,$3 sltu $1,$4,$3 lw $3,12($0) ori $4,$5,25...
; ; ZX Spectrum OPUS DISCOVERY specific routines ; ; Stefano Bodrato - Jun. 2006 ; ; void opus_lptwrite (unsigned char databyte); ; ; $Id: opus_lptwrite.asm,v 1.5 2016-06-27 19:16:34 dom Exp $ ; SECTION code_clib PUBLIC opus_lptwrite PUBLIC _opus_lptwrite EXTERN opus_rommap EXTERN P_DEVICE opus_lptw...
[BITS 32] [SECTION .text] extern main_64 global _start _start: mov eax, cr4 or eax, 0x20 mov cr4, eax mov eax, 0x100000 mov cr3, eax mov ecx, 0xC0000080 rdmsr or eax, 0x0100 wrmsr mov eax, cr0 or eax, 0xE0000000 xor eax, 0x60000000 mov cr0, eax [BITS 64] push 0x08 push...
; void *memalign(size_t alignment, size_t size) INCLUDE "config_private.inc" SECTION code_clib SECTION code_alloc_malloc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $01 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC memalign EXTERN aligned_alloc defc memalign = aligned_alloc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
BITS 32 org 0x7c00 mov edx, 0x03f8 in al, dx out dx, al jmp 0
;;; ; Prints the string on the console and starts a new line. ; The string will be appended to the current output string. ; It not be shown on screen until the command finishes its execution. ; ; params: ; string - The string to print ;;; proc ConsolePrintLine, string:QWORD invoke printf, rcx invo...
; ; $Id: 0x28.asm,v 1.1.1.1 2016/03/27 08:40:13 raptor Exp $ ; ; 0x28 explanation - from xchg rax,rax by xorpd@xorpd.net ; Copyright (c) 2016 Marco Ivaldi <raptor@0xdeadbeef.info> ; ; This snippet takes advantage of the rcr instruction, which ; shifts the cf flag into the most-significant bit and shifts ; the least-sig...
; uchar __FASTCALL__ *zx_aaddr2saddr(void *attraddr) ; aralbrec 06.2007 XLIB zx_aaddr2saddr .zx_aaddr2saddr ld a,h rlca rlca rlca xor $82 ld h,a ret
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1989 -- All Rights Reserved PROJECT: PC GEOS MODULE: Kernel Library FILE: graphicsStringUtils.asm AUTHOR: Jim DeFrisco, 13 October 1989 ROUTINES: Name Description ---- ----------- GBL ...
; IF statements (IfStatements.asm) ; Implementations of IF statements INCLUDE Irvine32.inc .data X DWORD ? Y DWORD ? op1 DWORD ? op2 DWORD ? .code main PROC call example_3 exit main ENDP ;---------------------------------------------------- example_3 PROC COMMENT @ if op1 > op2 then call Routine1...
section .data Snippet db 'MASSACRATION', 0dH, 0ah ;0dH + 0ah eh CR+LF section .text global _start _start: mov eax, 4 ; system call ID (Sys_write) mov ebx, 1 ; primeiro arg: file handler stdout mov ecx, Snippet ; segundo arg: ponteiro à string mov edx, 15 ; terceiro arg: tamanho da ...
; various utility functions ; - conv2dec ; - mult16 ; - divide16 ; - fatalerror ; - enable_interrupts ; - disable_interrupts ; - set_memory_normal ; - set_memory_all_ram ; - set_memory_no_basic ; various debug functions ; zero_processorports: ...<d000><e000><a000> on/off plus4_enable_ram = $ff3f plus4_enable_rom = $f...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1995 -- All Rights Reserved PROJECT: MODULE: FILE: hello3.asm AUTHOR: Allen Yuen, Jan 19, 1995 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ...
SECTION code_clib SECTION code_stdio PUBLIC __stdio_varg_2 EXTERN __stdio_nextarg_de ; __stdio_varg_n ; ; n = number of return addresses on stack ;******************************** IF __SDCC | __SDCC_IX | __SDCC_IY ;******************************** __stdio_varg_2: ; return pointer to the second argument of the...
print_message: pusha start: mov al, [bx] cmp al, 0 je done mov ah, 0x0e int 0x10 add bx,1 jmp start done: popa ret print_new_line: pusha new_line: mov al, 0x0a mov ah, 0x0e int 0x10 mov al, 0x0d int 0x10 popa ret
[BITS 32] global _start extern kernel_main CODE_SEG equ 0x08 DATA_SEG equ 0x10 _start: mov ax, DATA_SEG mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov ebp, 0x00200000 mov esp, ebp ; enabling A20 line in al, 0x92 or al, 2 out 0x92, al call kernel_main ...
.open "files/rels/d_a_ship.rel" ; Increase deceleration when the player holds A to stop the ship. .org 0x1068C ; Relocation for line 0x3A74 .int slow_down_ship_when_stopping2 ; Increase deceleration when the player is knocked out of the ship while it's moving. .org 0x106B4 ; Relocation for line 0x3BC8 .int slow_do...
; Library Test #1: Integer I/O (TestLib1.asm) ; Tests the Clrscr, Crlf, DumpMem, ReadInt, ; SetTextColor, WaitMsg, WriteBin, WriteHex, ; and WriteString procedures. INCLUDE Irvine32.inc .data arrayD DWORD 1000h,2000h,3000h prompt1 BYTE "Enter a 32-bit signed integer: ",0 dwordVal DWORD ? .co...
#include "CESCA.cpu" #include "startup.asm" ; Program for checking if the keyboard / keyboard controller work. ; Reads inputs from the keyboard and displays them on the LCD screen. SPECIAL_KEY = 0x80 RELEASED_KEY = 0x40 ENTER_KEY = 0x20 #bank program mov R0, 0 poll: mask IN, 0xFF ; Infinite loop until...
;********************************************************** ; This program Serial with A/D protocol based transmission. ;********************************************************** include "p16f877A.inc" __CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_OFF & _XT_OSC ;**********************************************...
setrepeat 2 frame 0, 04 frame 1, 04 frame 2, 04 dorepeat 1 endanim
; Procedure Thing Version xdef pr_vers ; V1.00 first version pr_vers equ '1.00' end
SYM $5800 ; symbols are to be placed at $5800 (growing downwards) ORG $5800 ; code is to be placed at $5800 (growing upwards) jmp start ; skip the message hello asciiz "Hello, world!\n" start: lda #<hello ldx #>hello jsr serial_print_message rts
; Original address was $B202 ; 5-9 .word W504_EndL ; Alternate level layout .word W504_EndO ; Alternate object layout .byte LEVEL1_SIZE_10 | LEVEL1_YSTART_140 .byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18 .byte LEVEL3_TILESET_13 | LEVEL3_VSCROLL_LOCKLOW | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX...
<% from pwnlib.shellcraft import pretty, common, registers from pwnlib.shellcraft.amd64 import mov, pushstr, setregs from pwnlib import constants %> <%docstring> Copies a string Example: >>> sc = 'jmp get_str\n' >>> sc += 'pop_str: pop rax\n' >>> sc += shellcraft.amd64.strcpy('rsp', 'rax') >>> sc += ...