content
stringlengths
23
1.05M
SECTION bss_clib PUBLIC nmi_vectors PUBLIC CLIB_NMI_VECTOR_COUNT defc CLIB_NMI_VECTOR_COUNT = 8 nmi_vectors: defs (CLIB_NMI_VECTOR_COUNT + 1) * 2
%macro cmpop 4 defop %1%2,%1_%3 pop rax pop rbx pop rcx cmp rbx, rcx %4 .true push 0 push rax ret .true: push 1 push rax ret %endmacro %macro invcmpop 4 defop %1%2,%1_%3 pop rax pop rbx pop rcx cmp rbx, rcx %4 .false push 1 push rax ret .false: push 0 push rax ret %endmacro ...
; uint32_t esx_f_seek(unsigned char handle, uint32_t distance, unsigned char whence) SECTION code_esxdos PUBLIC esx_f_seek_callee EXTERN asm_esx_f_seek esx_f_seek_callee: pop ix pop hl pop de pop bc ex (sp),ix ld a,ixl jp asm_esx_f_seek ; SDCC bridge for Classic IF __CLASSIC PUBLIC _esx_f...
BITS 32 section .text global start extern kmain start: cli mov esp, stack_space call kmain hlt section .bss resb 8192 stack_space: ;building kernel ;nasm -f elf32 kernel.asm -0 kasm.o ;gcc -m32 -c kernel.c -o kc.o ;ld -m elf_i386 link.ld -o kernel kasm.o kc.o
; ; jidctfst.asm - fast integer IDCT (non-SIMD) ; ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft'...
*=$0801 .byte $0c, $08, $0a, $00, $9e, $20 .byte $32, $30, $38, $30, $00, $00 .byte $00 *=$0820 inc $d020 rts
; QPC KBD polling routine (Windows driver) v1.00  2013 Marcel Kilgus section kbd xdef qpc_kbd_init xref ioq_test xref ioq_gbyt xref ioq_pbyt xref smsq_sreset include 'dev8_keys_sys' include 'dev8_keys_qdos_sms' include 'dev8_keys_chn' include 'dev8_keys_con' include 'dev8_keys_k' include 'dev8_keys_q...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GlobalPC 1998 -- All Rights Reserved PROJECT: GEOS MODULE: VGA16 Video Driver FILE: vga16Tables.asm AUTHOR: Jim DeFrisco REVISION HISTORY: Name Date Description ---- ---- ----------- jad 10/92...
bits 32 actively_cause_global_warming32: test ecx, ecx jz .done push ebx push eax xor al, al .warm_up: mov ebx, 0xffff .warm_up1: out 0x80, al dec ebx jnz .warm_up1 dec ecx jnz .warm_up pop eax pop ebx .done: ret vidmem_addr: dq 0xb8000 puts32: push ax pus...
;The MIT License (MIT) ;Copyright (c) 2017 Robert L. Taylor ;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, modif...
Name: title-e.asm Type: file Size: 58345 Last-Modified: '1992-06-28T15:00:00Z' SHA-1: A91E569FBB9B6C0265EC7E152A3D4124AECDAF47 Description: null
extern kernel_start section .text bits 64 ; https://en.wikipedia.org/wiki/CPUID %define CPUID_LARGEST_EXTENDED_FUNCTION 0x80000000 %define CPUID_EXTENDED_FEATURES 0x80000001 %define CPUID_FEATURE_64BITS 1 << 29 long_mode: ; check if the system supports long mode ; CLOBBER ; eax, edx .check: mov eax, CPUID_LARGEST...
;************************************************************************** ;* ;* FILE main.asm ;* Copyright (c) 2001, 2003 Daniel Kahlin <daniel@kahlin.net> ;* Written by Daniel Kahlin <daniel@kahlin.net> ;* $Id: main.asm,v 1.9 2003/07/12 10:05:25 tlr Exp $ ;* ;* DESCRIPTION ;* sys + copydown ;* ;****** PROCESSOR ...
sw $4,8($0) subu $4,$3,$3 sw $4,0($0) xor $3,$4,$3 sra $4,$5,20 sltu $3,$3,$3 slt $5,$5,$3 sra $1,$0,9 sltu $3,$4,$3 slt $4,$4,$3 lh $3,4($0) xor $6,$6,$3 subu $3,$1,$3 sh $4,6($0) srlv $3,$2,$3 lw $6,0($0) sltiu $3,$1,3146 addiu $1,$4,7005 addu $1,$4,$3 srl $0,$2,4 sh $3,0($0) sb $4,15($0) addu $3,$3,$3 addu $5,$3,$3 ...
section d ; Runtime vars (define before constants because they're used more so should be at start of memory) i temp1 i temp2 i input i frame_count 0 i enemy_move_counter 0 i playing 1 i died 0 i player_pos_x 30 i player_pos_y 30 i enemy_pos_x 5 i enemy_pos_y 5 i player_offset_x i player_offset_y ; Constants i false 0 ...
TITLE 'ASM OPERAND SCAN MODULE' ; OPERAND SCAN MODULE ORG 1860H ; ; EXTERNALS IOMOD EQU 200H ;I/O MODULE SCMOD EQU 1100H ;SCANNER MODULE SYMOD EQU 1340H ;SYMBOL TABLE MODULE BMOD EQU 15A0H ;BINARY SEARCH MODULE ; ; PERR EQU IOMOD+18H SCAN EQU SCMOD+6H ;SCANNER ENTRY POINT CR EQU 0DH ;CARRIAGE RETURN ; LOOKUP EQU SYMO...
; simple loop example which iterates through a loop ten times, ; printing the variable value each time. section .bss nums resb 10 section .data newLine db 0xa,0xd NewLen equ $- newLine section .text global _start _start: mov ecx,10 ; loop variable -> counter mov eax, ...
; void *tshc_cxy2saddr(uchar x, uchar y) SECTION code_clib SECTION code_arch PUBLIC tshc_cxy2saddr EXTERN zx_cxy2saddr defc tshc_cxy2saddr = zx_cxy2saddr
COPY START 0 FIRST STL RETADR LDB #LENGTH BASE LENGTH CLOOP +JSUB RDREC LDA LENGTH COMP #0 JEQ ENDFIL +JSUB WRREC J CLOOP ENDFIL LDA EOF STA BUFFER LDA #3 STA LENGTH +JSUB WRREC J @RETADR EO...
%assign bootloader_memory_address 7c0h %assign bootloader_size 2048 %assign stack_size 1024 %assign stack_pointer_initial_offset stack_size - 1 ; set up stack space after this bootloader mov ax, bootloader_memory_address add ax, bootloader_size ; skip to the end of the bootloader mov ss, ax ; set stack segment mov sp,...
; IO Device USE (prc interface) V2.02  1986 Tony Tebby QJUMP section exten xdef iou_usep xref iou_ipar include 'dev8_keys_iod' ;+++ ; This is the model of the procedure RAM_USE, FLP_USE etc. ; ; XXX_USE yyy or XXX_USE ; ; d0 cr offset of device linkag...
;*************************************************************************** ;* ;* USER.ASM - User code goes here ;* ;* This is just a slideshow using some of the routines in my tiny library/OS ;* ;*************************************************************************** INCLUDE "irq.i" INCLUDE "utility.i...
;***************************************************************************** ;* const-a.asm: x86 global constants ;***************************************************************************** ;* Copyright (C) 2010-2019 x264 project ;* ;* Authors: Loren Merritt <lorenm@u.washington.edu> ;* Fiona Glaser <fion...
; OS function vectors USERV = &0200 BRKV = &0202 IRQ1V = &0204 IRQ2V = &0206 CLIV = &0208 BYTEV = &020A WORDV = &020C WRCHV = &020E RDCHV = &0210 FILEV = &0212 ARGSV = &0214 BGETV = &0216 BPUTV = &0218 GBPBV = &021A FINDV = &021C FSCV = &021E EVNTV = &0220 UPTV = &0222 NETV = &0224 VDUV = &0226 KEYV = &0228 INSBV = &0...
* Return to Moveable Program Area V2.00  1986 Tony Tebby QJUMP * section sms * xdef sms_rmpa * xref mem_ctpa contract tpa xref sms_rtok return * include dev8_keys_sys include dev8_keys_sbt * * d0 r 0, no errors * d1 cr space to be returned/ space returned * * all other registers preserved * sms_rmpa mov...
;---------------------------------------------- ; Virus V-547 ; ; Dissasembled: Andrzej Kadlof April 1991 ; ; (C) Polish Section of Virus Information Bank ;---------------------------------------------- 0100 E9FD00 JMP 0200 ; jump to virus ; .... ; victim code ;==================== ; virus entry po...
addi $t0, $zero, 0xe # fetch i addi $t1, $zero, 0xa # fetch N sub $t2, $t0, $t1 blez $t2, skip # branch add $t2, $zero, $zero # A = 0 skip:
/* * PWM Servo Lib * * org: 10/13/2014 * auth: Nels "Chip" Pearson * * Target: LCD_CDM-116100 Demo Board, 8MHz * * Resources * SRAM * * IO * * PWM servo driver. 1.0ms(Fwd) - 1.5ms (Stop) - 2.0ms (Rev) pulse at 10-20ms period. * PB1 and PB2 link to PWM counters. */ .equ PWM_RIGHT = 1 .equ PWM_LEFT = 2 ...
title "Sleep Handlers" ;++ ; ; Copyright (c) 1989 Microsoft Corporation ; ; Module Name: ; ; ixsstate.asm ; ; Abstract: ; ; This module implements the code for putting the machine to ; sleep. ; ; Author: ; ; Jake Oshins (jakeo) March 13, 1997 ; ; Environment: ; ; Kernel mo...
page ,132 title asmstubs - Various bits of stuff which would be inline assembly if we had a real compiler .code ;; VOID cpuid(uint32_t lead, uint32_t *peax, uint32_t *pebx, ;; uint32_t *pecx, uint32_t *pedx) public _cpuid _cpuid proc push rbx mov rax, rcx mov r10, rdx mov ebx, 072746943h ;; poison ...
; ; Philips VG5000 ; ; getkey() Wait for keypress ; ; Jun 2014 - Joaopa ; ; ; $Id: getk.asm,v 1.3 2015/01/19 01:33:21 pauloscustodio Exp $ ; PUBLIC getk ld ix,$47FA .getk call 12983 ld l,a ld h,0 ret
; void tshc_cls(uchar attr) SECTION code_clib SECTION code_arch PUBLIC tshc_cls EXTERN asm_tshc_cls defc tshc_cls = asm_tshc_cls
.intel_syntax noprefix MOV rcx, r14 # initialize eax and ebx with two random values XOR rax, rax XOR rbx, rbx IMUL edi, edi, 2891336453 ADD edi, 12345 MOV eax, edi IMUL edi, edi, 2891336453 ADD edi, 12345 MOV ebx, edi LFENCE # delay the cond. jump LEA rbx, [rbx + rax + 1] LEA rbx, [rbx + rax + 1] LEA rbx, [rbx + rax ...
bits 16 org 0x100 ; Start program at offset 100h jmp main ; Jump to main program message: db 'Hello World',0ah,0dh,'$' main: mov dx,message ; Start address of message mov ah,09 ; Prepare for screen display int 21h ; DOS interrupt 21h int 20h ; Terminate program
.thumb .org 0x0 @new def getter; bxed to from 19250 push {r4-r5,r14} mov r4,r0 ldr r1,Get_Equipped_Weapon mov r14,r1 .short 0xF800 ldr r1,Get_Weapon_Def_Bonus mov r14,r1 .short 0xF800 mov r5,r0 ldrb r0,[r4,#0x17] add r5,r0 ldr r0,Is_Capture_Set mov r14,r0 mov r0,r4 .short 0xF800 cmp r0,#0x0 beq GoBack lsr ...
TITLE Test Floating-point output (asmMain.asm) ; Test the printf and scanf functions from the C library. INCLUDE Irvine32.inc TAB = 9 .code asmMain PROC C ;---------- test the printf function -------------- ; Do not pass REAL4 variables to printf using INVOKE! .data formatTwo BYTE "%.2f",TAB,"%.3f",0dh,0ah,...
SafariZoneGate_Object: db $a ; border block db 4 ; warps warp 3, 5, 4, -1 warp 4, 5, 4, -1 warp 3, 0, 0, SAFARI_ZONE_CENTER warp 4, 0, 1, SAFARI_ZONE_CENTER db 0 ; signs db 2 ; objects object SPRITE_WHITE_PLAYER, 6, 2, STAY, LEFT, 1 ; person object SPRITE_WHITE_PLAYER, 1, 4, STAY, RIGHT, 2 ; person ; war...
; [fail] [bits 64] crc32 r8d, bh ; error crc32 rax, bh ; error
; ; Copyright (c) 2010 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...
.macro waitRetrace() { loop: ldy $d012 bne loop } .macro setColor(color) { lda #color sta $d020 }
; ------------------ ; GAMEPLAY LOOP ; ------------------ .proc gameplay minFrames dta b(engineMinFrames) animationSwitchDelay dta b(configAnimationSwitchDelay) .proc loop jsr prPrepareFrame jsr clearBufScreen jsr level.mainLoop jsr OLP.mainLoop jsr HIT.mainLoop jsr SPAWN.mainLoop jsr...
# # This example/test starts becoming interesting. We have a tty handler # which echoes read characters back to the console. We also have a clock # handler which periodically fires with tracing enabled. # # When this example is working as intended, the user should be able to # see their input echoed back to the attache...
// keyboard = RAM[24576] screen = RAM[16384] - RAM[] @i M=0 @16384 D=A @scr M=D @8191 D=A @limit M=D (REFRESH) @KBD D=M @HIDE D;JEQ @SHOW 0;JMP (SHOW) @i D=M @scr A=D+M M=-1 @limit D=D-M @REFRESH D;JEQ @i M=M+1 @REFRESH 0;JMP (HIDE) @i D=M @scr A=M+...
# SYNTAX TEST "Packages/Assembly-6809/Assembly-6809.sublime-syntax" # <- source.mc6809 ; Indexed addressing mode ;------------------------------------------------------------------------------ ; Constant offset from R lda ,x comment # ^ operator.separator # ^ variable.language.register ...
;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1991 ; * All Rights Reserved. ; */ ; ; Portliba -- routines to support transport of lattice C to Cmerge ; ; Copyright (c) Microsoft Corporation, 1984 ; ; This file contains: ; c...
; =========================================================================== ; --------------------------------------------------------------------------- ; AMPS - SMPS2ASM macro & equate file ; --------------------------------------------------------------------------- ; Note Equates ; -------------------------------...
;Pong clone for the Chip 16 ;Shendo 2011 ; ;r0 - Player 1 X coordinate ;r1 - Player 1 Y coordinate ;r2 - Player 1 score ;r3 - Player 2 X coordinate ;r4 - Player 2 Y coordinate ;r5 - Player 2 score ;r6 - Ball X position ;r7 - Ball Y position ;r8 - Ball X direction (0 - left, 1 - right) ;r9 - Ball Y direction (0 - still,...
DATA SEGMENT ;LCD DATA ;variables to keep track of port data LCD_PORTA_VAL DB 0 LCD_PORTB_VAL DB 0 LCD_PORTC_VAL DB 0 ;port addresses LCD_PORTA equ 00001000B LCD_PORTB equ 00001010B LCD_PORTC equ 00001100B LCD_PORTR equ 00001110B ;END LCD DATA ;keypad define ...
; BigLittle.asm - copies a value from big-endian to little-endian, reversing the order of the bytes .386 .model flat, stdcall .stack 4096 ExitProcess PROTO, dwExitCode:DWORD .data bigEndian BYTE 12h, 34h, 56h, 78h littleEndian DWORD ? .code main PROC mov eax, 0 mov al, [bigEndian + 3] mov BY...
RockTunnel2_h: db CAVERN ; tileset db ROCK_TUNNEL_2_HEIGHT, ROCK_TUNNEL_2_WIDTH ; dimensions (y, x) dw RockTunnel2Blocks, RockTunnel2TextPointers, RockTunnel2Script ; blocks, texts, scripts db $00 ; connections dw RockTunnel2Object ; objects
;PWM and bit signal Controler ;8-ch PWM output, 16-ch bit (on/off) output @ 50Hz ;At 12MHz, 12T: ;1 cycle = 1 micro second ;00000-00500: PWM all high, Set ON/OFF ;00500-02500: PWM to 0 according to input ;02500-20000: Receive input UART and process ;PWM Resulution: 1/250 ;Refresh every 8us (8 cycles), 8us * 250times ...
;; $Header: /cvsroot/uuu/uuu/src/apps/init/init.asm,v 1.2 2001/12/15 20:03:01 instinc Exp $ ;; ;; by Dave Poirier (instinc@users.sourceforge.net) ;; Distributed under the modified BSD License ;; [bits 32] ;------------- section .text ;----------------------------------------------------------------...
sumArray: enter 0,0 mov eax, 0 mov edx, [ ebp + 8 ] mov ecx, [ ebp + 12 ] jcxz .skip .back: add eax, [ edx + ecx * 4 - 4 ] loop .back .skip: leave ret
; uint in_KeyPressed(uint scancode) ; 09.2005 aralbrec SECTION code_clib PUBLIC in_KeyPressed PUBLIC _in_KeyPressed ; Determines if a key is pressed using the scan code ; returned by in_LookupKey. ; enter : l = scan row ; h = key mask ; exit : carry = key is pressed & HL = 1 ; no carry = key not pre...
-- 7 Billion Humans -- -- 31: Checkerboard Organisation -- -- Size: 7/7 -- -- Speed: 94/117 -- mem1 = nearest printer a: if c == nothing: drop takefrom mem1 step w,n,e endif step nw,sw,ne,se jump a
***************************************************************************** ; Name : IntroSharedData.i ; Coded by : Antiriad (Jonathan Bennett <jon@autoitscript.com) ; Description : Resources that need to be shared between parts. ; generally music files, screen buffers, and fonts. ; CPU Required : MC6...
; process ; int listen_callee(int sockfd, int backlog); ; The Spectranet listen() implementation currently does not take a ; backlog parameter, but it must be provided for compatibility. PUBLIC listen_callee PUBLIC ASMDISP_LISTEN_CALLEE include "spectranet.asm" .listen_callee pop hl ; return addr pop de ; int bac...
* A partir de los valores de sus lados proporcionados en posiciones de memoria * en 8 bits cada uno, enteros sin signo, determinar el tipo de triangulo. * Indicar en ASCII si es "E"quilatero, "I"sosceles o "K" (Escaleno y Cristinista) ORG $0000 ;Determinar el tipo de triangulo L1 RMB 1 ;Longitud de lad...
; Restores the ability to inspect and set game flags in the cheat menu. In the ; released versions of U7BG and U7SI, the sites that might have called some ; function to prompt the user for a flag number instead called a function ; that would always return -1 (an invalid flag number). This patch replaces ; ...
INCLUDE Irvine32.inc .data temp DWORD 0 temp2 DWORD 0 a DWORD 2 i DWORD 10 .code main PROC mov al,'i' call WriteChar mov al,'=' call WriteChar mov al,' ' call WriteChar push i pop eax mov temp , eax call WriteDec mov al,' ' call WriteChar call Crlf push 0 pop eax mov temp , eax mov ecx,temp m...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: PostScript Translation Library FILE: exportComments.asm AUTHOR: Jim DeFrisco, 14 Feb 1991 REVISION HISTORY: Name Date Description ...
bits 32 %define CACHE_SIZE 32 %define MAXHEIGHT 1024 %define DPS_MAXSPANS MAXHEIGHT+1 %define spanpackage_t_size 32 %define SPAN_SIZE (((DPS_MAXSPANS + 1 + ((CACHE_SIZE - 1) / spanpackage_t_size)) + 1) * spanpackage_t_size) D_PolysetDraw: sub esp,SPAN_SIZE
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: PostScript printer driver FILE: pscriptDriverInfo.asm AUTHOR: Jim DeFrisco, 15 May 1990 REVISION HISTORY: Name Date Description -...
TITLE Extended Open/Create (Fileio.asm) ; Demonstration of 16-bit FileIO under Windows 95/98/ME. ; The complete program does not appear in the text, but ; excerpts do appear. ; Last update: 11/12/01 INCLUDE Irvine16.inc .data Date WORD ? handle WORD ? actionTaken WORD ? FileName BYTE "long_fi...
; A107493: Coefficients of a certain theta series. ; 1,0,0,0,0,0,4,4,8,0,6,4 mov $1,$0 mov $2,$0 sub $0,2 trn $0,3 mul $1,2 sub $1,3 mul $0,$1 bin $0,$2 mod $0,10
;------------------------------------------------------------------------------ ; security_check_cookie.asm ; MS_CHANGE_? ;------------------------------------------------------------------------------ EXTRN __security_cookie:QWORD .code ;----------------------------------------------------------------------...
_servo: ;Servo.mbas,7 :: sub procedure servo (dim x as byte) ;Servo.mbas,8 :: portc.5 = 1 BSF PORTC+0, 5 ;Servo.mbas,9 :: delay_us (600) MOVLW 10 MOVWF R12, 0 MOVLW 88 MOVWF R13, 0 L__servo1: DECFSZ R13, 1, 1 BRA L__servo1 DECFSZ R12, 1, 1 BRA ...
; You may customize this and other start-up templates; ; The location of this template is c:\emu8086\inc\0_com_template.txt org 100h MOV AX, 01 MOV BX, 02 ADD AX,BX,BX,AX ret
; ; jsimddjg.asm - SIMD instruction support check (for DJGPP V.2) ; ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembl...
CinnabarPokecenter_Script: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing CinnabarPokecenter_TextPointers: dw CinnabarHealNurseText dw CinnabarPokecenterText2 dw CinnabarPokecenterText3 dw CinnabarTradeNurseText CinnabarHealNurseText: script_pokecenter_nurse CinnabarPokecen...
; Multiword procedure arguments (Multiword.asm) ; This program demonstrates the passing of a 64-bit argument ; to a procedure. INCLUDE Irvine32.inc .data longVal DQ 1234567800ABCDEFh .code main PROC push DWORD PTR longVal + 4 ; high push DWORD PTR longVal ; low call WriteHex64 call Crlf exit main ENDP ...
; Split a string 06/01-92 O.Fink section string include win1_keys_err xdef st_splta ; split string after position ;+++ ; split a standard string after a position ; abcdef -> split after 2 -> 1st=ab ; 2nd=cdef ; ; Entry ...
; Macro invocations not followed by a newline may scan an EOF; ; If this is the case, it shouldn't cause the parse to end before the macro is expanded mac: macro PRINTLN "Hi beautiful" endm mac
; generic rectangle drawing routines ; draw a filled rectangle to a framebuffer ; inputs: ; r0: X coordinate of top-left ; r1: Y coordinate of top-left ; r2: X size ; r3: Y size ; r4: color ; r5: pointer to framebuffer ; r6: framebuffer width (pixels) ; outputs: ; none draw_filled_rectangle_generic: push r0 pu...
;------------------------------ Module Header ------------------------------; ; Module Name: Timer interface procedures ; ; Created: ??-???-83 ; ; Copyright (c) 1983, 1984, 1985, 1986, 1987 Microsoft Corporation ; ; History: ; 10-Jan-87 by ronm Adusted StackBase to be even ; 9-Jan-87 by ronm Patches to s...
SECTION code_driver SECTION code_driver_terminal_output PUBLIC sms_01_output_terminal_tty_z88dk_02_pattern_offset sms_01_output_terminal_tty_z88dk_02_pattern_offset: ; de = parameters * ld a,(de) ; a = MSB pattern offset inc de and $01 ld (ix+24),a ld a,(de) ...
; @@@ void mikeos_pause(unsigned int deciseconds); %include "os_vector.inc" section .text use16 global _mikeos_pause _mikeos_pause: push bp mov bp, sp mov ax, [bp + 4] mov bx, os_pause call bx pop bp ret
SECTION code_clib PUBLIC VTI_DISPLAY defc VTI_DISPLAY = $F800 ;Default address ; This default address can be overridden on the command line ; with -pragma-export:VTI_DISPLAY=0xnnn
cmp #$80 ror cmp #$80 ror cmp #$80 ror cmp #$80 ror
SFX_Battle_18_Ch7: noisenote 4, 15, -7, 85 noisenote 8, 15, 1, 101 endchannel
; ISR_example.asm: a) Increments/decrements a BCD variable every half second using ; an ISR for timer 2; b) Generates a 2kHz square wave at pin P3.7 using ; an ISR for timer 0; and c) in the 'main' loop it displays the variable ; incremented/decremented using the ISR for timer 0 on the LCD. Also resets it to ; ze...
; ; Fibonacci ; ; This program display the Fibonacci series ; init: seta 0 ; initialize display out sta f_n-1 ; init F_n-1 seta 1 sta f_n ; init F_n ldi max_n ; init loop counter start: lda f_n ; load F_n value into A ...
cpu 8086 org 0x100 pop ax ; 58 xor ax,[bp+12] ; 33 46 xx stosb ; AA inc di ; 47 mov al,ah ; 88 E0 stosb ; AA inc di ; 47 add sp,10 ; 83 C4 xx add bp,10 ; 83 C4 xx To remove both bytes, replace "xor ax,[bp+12]" with...
; adapted from asmtutor.com ; run make to compile and link SECTION .data msg db 'Hello, brave new world!', 0Ah SECTION .text global _start _start: mov ebx, msg ; move the address of our message string into EBX call strlen ; call our function to calculate the length of the string ...
.def TargetY =r17 HilightRectangle: ; PushAll push r17 lds TargetY, Y2 Hili1: lds t, Y1 sts Y2, t call Bresenham lds t, Y1 inc t sts Y1, t cp t, TargetY brlo Hili1 ; PopAll pop r17 ret .undef TargetY PrintSelector: lpm t, z+ sts X1, t lpm t, z+ sts Y1, t lpm t,...
GLOBAL invOp GLOBAL div0 div0: mov rdx, 5 mov al,1 mov bl,0 div bl ret invOp: ud2 ret
IF !DEF(SOFTWARE_CONSTANTS_INCLUDED) SOFTWARE_CONSTANTS_INCLUDED SET 1 BG_PALETTE EQU %11100100 FG_PALETTE EQU %11000110 TILE_SIZE EQU 16 INPUT_THROTTLE EQU 4 START EQU %10000000 SELECT EQU %01000000 A_BTN EQU %00100000 B_BTN EQU %00010000 DOWN EQU %00001000 UP EQU %00000100 LEFT EQU %00000010 ...
; ; ; Support char table (pseudo graph symbols) for the Jupiter Ace ; Sequence: blank, top-left, top-right, top-half, bottom-left, left-half, etc.. ; ; $Id: textpixl.asm $ ; ; SECTION rodata_clib PUBLIC textpixl .textpixl defb 32, 18, 17, 19 defb 23+128, 21+128, 22+128, 20+128 defb 20, ...
; ; ZX81 Tape save routines ; ; ; void __FASTCALL__ set_tape_speed(uchar speed) ; ; ; $Id: set_tape_speed.asm,v 1.1 2012/01/09 16:02:36 stefano Exp $ ; XLIB set_tape_speed LIB musamy_save XREF SAVE_SPEED set_tape_speed: ld a,l ld (musamy_save-musamy_save+SAVE_SPEED+1),a ret
incasm "kernel.hdr" main @loop jsr console.clear$ lda #color.white$ sta console.setcharactercolor.color$ jsr console.setcharactercolor$ lda #<title sta console.writestr.straddress$ lda #>title sta console.writestr.straddress$+1 jsr console.writ...
# all numbers in hex format # we always start by reset signal # this is a commented line .ORG 0 # this means the the following line would be at address 0 , and this is the reset address 10 # you should ignore empty lines .ORG 2 # this is the interrupt address 100 .ORG 10 setC # C --> 1 NOP # ...
; 16-битная адресация, пока мы находимся в реальном режиме BITS 16 org 0x7c00 start: jmp 0x0000:entry ; Теперь CS=0, IP=0x7c00 entry: mov ax, cs mov ds, ax ; Очистить экран mov ax, 0x0003 int 0x10 ; Открыть A20 in al, 0x92 or al, 2 out 0x92, al ; Переключить видеорежим mov ah, 0 mov al,...
; ************************************************** ; PSGlib - C programming library for the SEGA PSG ; ( part of devkitSMS - github.com/sverx/devkitSMS ) ; ************************************************** INCLUDE "PSGlib_private.inc" SECTION code_clib SECTION code_PSGlib PUBLIC asm_PSGlib_SFXStop EXTERN __PSGli...
;================================================================================ ; Four Digit Rupees ;-------------------------------------------------------------------------------- Draw4DigitRupees: LDA $7EF362 JSL.l HexToDec ;REP #$30 LDA $7F5004 : AND.w #$00FF : ORA.w #$2400 : STA $7EC750 LDA $7...
[org 0x7c00] mov [BOOT_ENTRY], dl mov bp, 0x9000 ; stack mov sp, bp mov bx, MSG_REAL_MODE call print ;activate 32-bit protected mode ; MSG_REAL_MODE db "Started in 16-bit Real Mode", 0 len equ $ - MSG_REAL_MODE BOOT_ENTRY db 0 %include "./boot_print_16real.asm" times 510-($-$$) db 0 dw 0xaa55
; A036500: Number of inequivalent cyclic Hadamard difference sets with parameters (2^n-1, 2^(n-1)-1, 2^(n-2)-1). ; 1,1,1,1,2,2,6,4,5,10 mov $1,8 trn $1,$0 dif $1,2 trn $0,$1 dif $0,2 add $0,1
// AT 4000 AND 4002 LEAST SIGNIFICANT NIBBLE AND THERE AND VICE VERSA LXI H,4000 ADC M LXI H,4002 ADC M STA 5000 MVI A,00 LXI H,4001 ADC M LXI H,4003 ADC M STA 5001 MVI B,00 JNC TEST INR B TEST: MOV A,B STA 5002 RST 1
START: LI R0 0XF8 SLL R0 R0 0X00 LI R1 0X01 SW R0 R1 0X00 LI R1 0X02 SW R0 R1 0X00 FOREVER: NOP B FOREVER NOP NOP
; ; jiss2fst.asm - fast integer IDCT (SSE2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; ; 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 jsimdext.inc ; ; This file should be assemble...
#initial lui $1,0x2819 ori $1,$1,0x9384 lui $2,0x7cfd ori $2,$2,0x5738 lui $3,0x883c ori $3,$3,0x8847 lui $4,0x9382 ori $4,$4,0xacfe sw $1,0($0) sw $2,4($0) sw $3,8($0) sw $4,12($0) #lh ori $5,$0,1 ori $1,$0,4 mult $1,$5 mflo $5 lh $1,-2($5) lh $2,0($5) ori $6,$0,8 ori $3,$0,4 div $6,$3 mflo $6 ori $7,$0,7 lh $2,2($6) ...