content stringlengths 23 1.05M |
|---|
; subscreen
; This program demonstrates the difference between the main screen and the subscreen
.INCLUDE "../lib/header.asm"
.INCLUDE "../lib/registers.asm"
.INCLUDE "../lib/settings.asm"
.INCLUDE "../lib/values.asm"
.INCLUDE "../lib/initialization.asm"
.BANK 0
.ORG 0
.SECTION ""
Main:
Reset
; Set accumul... |
; Doubling of group elements
;
; Author: Daan Sprenkels <hello@dsprenkels.com>
%include "ge_double.mac"
global crypto_scalarmult_curve13318_ref12_ge_double
section .text
crypto_scalarmult_curve13318_ref12_ge_double:
%xdefine stack_size 6*384 + 192 + 768
; build stack frame
push rbp
mov rbp, rsp
... |
-- 7 Billion Humans --
-- 30: Fill the floor --
-- Size: 6/6 --
-- Speed: 1108/192 --
mem1 = nearest printer
a:
drop
takefrom mem1
if c != nothing:
step nw,w,sw,n,s,ne,e,se
endif
jump a
|
os.(*File).close STEXT dupok nosplit size=26 args=0x18 locals=0x0
0x0000 00000 (<autogenerated>:1) TEXT os.(*File).close(SB), DUPOK|NOSPLIT|ABIInternal, $0-24
0x0000 00000 (<autogenerated>:1) PCDATA $0, $-2
0x0000 00000 (<autogenerated>:1) PCDATA $1, $-2
0x0000 00000 (<autogenerated>:1) FUNCDATA $0, gclocals·e6397a... |
SECTION code_l_sccz80
PUBLIC l_i64_lneg
EXTERN __i64_acc
; Entry: hl = number to lneg
l_i64_lneg:
ld hl,__i64_acc
ld a,(hl)
inc hl
or (hl)
inc hl
or (hl)
inc hl
or (hl)
inc hl
or (hl)
inc hl
or (hl)
inc hl
or (hl... |
; Blinking LED: every 1008 ms
;
; Created: 18/03/2022 12:42:45
; Author : Andrés Alippi
;
; I extracted an example from book "AVR Microcontroller and Embedded Systems" and modified it.
; .INCLUDE "tn85def.inc"
.EQU COUNTER = 127 ;auxiliar counter for extra delay
.ORG 0x0 ;location for reset
RJMP MAIN ... |
;#########################################################################
; VKim's Debug
include masm32.inc
include debug.inc
includelib debug.lib
;PrintHex eax
;PrintDec eax
;PrintStringByAddr eax
|
extern putchar
extern printf
intPrintFormat db "%d", 10, 0
charPrintFormat db "%c", 10, 0
pointerPrintFormat db "%p", 10, 0
printI8:
sub rsp, 8
mov esi, edi
mov edi, intPrintFormat
xor al, al
call printf
add rsp, 8
ret
printI16:
sub rsp, 8
mov esi, edi
mov edi, intPrintFormat
... |
Name: Missile.asm
Type: file
Size: 3890
Last-Modified: '1992-11-18T01:48:24Z'
SHA-1: 28BF52C90E5E578A177DDCEB49212A5464396A09
Description: null
|
main:
whiletrue:
call clear_leds
call wait
addi a0,zero,5
addi a1,zero,5
call set_pixel
call wait
jmpi whiletrue
break
;Set all LEDS to 0
; BEGIN:clear_leds
clear_leds:
stw zero,LEDS(zero)
stw zero,LEDS+4(zero)
stw zero,LEDS+8(zero)
ret
; END:clear_leds
;Set one LED to 1
;Args:
; -a0: the... |
# Calcular o exponencial a^b
# $s0 - Base
# $s1 - Exponent
# $t0 - Base backup
# $t1 - Counter
main: li $s0, 2 # Loads 4 as base
li $s1, 2 # Loads 10 as exponent
move $t0, $s0 # Copy the base value to $t0
li $t1, 1 # Initialize the couter $t1
loop: mul $s0, $t0, $s0 # Multiplies current va... |
#-- INPUT N
START: PRINT @S0[PROGRAM_END+0]
N[MEMORY_CONTEXT+0] = READ
#-- LET F(1) = 1
@T1[MEMORY_CONTEXT+24] = (1 - 1)
@T1[MEMORY_CONTEXT+24] = (@T1[MEMORY_CONTEXT+24] * 8)
F[MEMORY_CONTEXT+8](@T1[MEMORY_CONTEXT+24]) = 1... |
NewGame:
ld a,0
call FillBoard
ld ix,GameState
ld (ix+0),0
ld (ix+1),0
ld (ix+2),0
call PlayGame
ld hl,PlayAgain
call Println
ld hl,Choice
call Readln
ld ix,NoString
call StringEqual
cp 1
ret z
jr NewGame
;in: hl, the address of userput
;out: a = 0,1,2 for the first row or column found, 9 if there's ... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: bigcalcUnaryCvt.asm
AUTHOR: Christian Puscasiu, Jun 16, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
... |
DoInGameTradeDialogue:
; trigger the trade offer/action specified by wWhichTrade
call SaveScreenTilesToBuffer2
ld hl,TradeMons
ld a,[wWhichTrade]
ld bc,$e
call AddNTimes
ld a,[hli]
ld [wInGameTradeGiveMonSpecies],a
ld a,[hli]
ld [wInGameTradeReceiveMonSpecies],a
ld a,[hli]
push af
ld de,wInGameTradeMonNick
... |
BonusLayout_Typical: .include "PRG/levels/Bonus/Typical"
BonusLayout_NoTable: .include "PRG/levels/Bonus/NoTable"
BonusLayout_BlueBox: .include "PRG/levels/Bonus/BlueBox"
BonusLayout_Empty1: .include "PRG/levels/Bonus/Empty1"
BonusLayout_Empty2: .include "PRG/levels/Bonus/Empty2"
|
Func_f1e70:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonMansion1Text_f1e96
call PrintText
callab IsStarterPikachuInOurParty
ret nc
callab GetFirstMoninWhich
call GetPartyMonName2 ;then use TX_RAM wcd6d, gives species name but close enough
ld hl, CeladonMansionText_f1e9c
call Pri... |
; =============================================================================
; BareMetal -- a 64-bit OS written in Assembly for x86-64 systems
; Copyright (C) 2008-2015 Return Infinity -- see LICENSE.TXT
;
; Input Functions
; =============================================================================
; ---------... |
user/_strace: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <main>:
#include "kernel/param.h"
#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"
int main(int argc, char *argv[]) {
0: 712d addi sp,sp,-288
2: ee06 sd ra,2... |
Pila Segment Stack 'Stack'
dw 2048 dup(?)
Pila Ends
Datos Segment
Datos Ends
Codigo Segment
Assume DS:Datos,CS:Codigo,SS:Pila
inicio:
mov ax,0013h
int 10h
mov ax, 0A000h
mov ds, ax
mov cx,0C800h ;
xor dx,dx
xor di,di
mov cx,10h
columnas:
... |
; Generated by CharPad 2. Assemble with 64TASS or similar.
; General constants:-
TRUE = 1
FALSE = 0
COLRMETH_GLOBAL = 0
COLRMETH_PERTILE = 1
COLRMETH_PERCHAR = 2
; Project constants:-
COLOURING_METHOD = COLRMETH_PERCHAR
CHAR_MULTICOLOUR_MODE = TRUE
COLR_SCREEN = 0
COLR_CHAR_DEF = 14
COLR_CHAR_... |
%include "printf32.asm"
section .text
global main
extern printf
main:
mov eax, 4
PRINTF32 `%d\n\x0`, eax
jump_incoming:
jmp exit ; salt neconditionat catre label-ul exit
mov eax, 7 ; codul acesta nu se executa
mov ebx, 8
add eax, ebx
PRINTF32 `... |
# File: allocate_mem.asm
# Author: K. Reek
# Contributors: P. White, W. Carithers
#
# Description: Dynamic memory allocator.
#
# Revisions: $Log$
# CONSTANTS
#
# syscall codes
PRINT_STRING = 4
EXIT = 10
.data
.align 2
#
# Memory for allocating up to 200 words.
#
next:
.word pool
pool:
.space 800 # room fo... |
CGABubbles label byte
word C_BLACK
Bitmap <67,41,0,BMF_MONO>
db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00
db 0x7f, 0xff, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff,
0xc0
db 0x7f, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff,
0xc0
db 0x7f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xc0,
0x00
db 0x... |
/*
* Yeppp! library runtime infrastructure
*
* This file is part of Yeppp! library and licensed under MIT license.
* See runtime/LICENSE.txt for details.
*
*/
.include "common.inc"
.syntax unified
BEGIN_ARM_FUNCTION memcpy
.arch armv5t
TST r2, r2
BEQ .finish
MOV r3, r0
.copy_... |
[SECTION .data]
;;; Here we declare initialized data. For example: messages, prompts,
;;; and numbers that we know in advance
[SECTION .bss]
;;; Here we declare uninitialized data. We're reserving space (and
;;; potentially associating names with that space) that our code
;;; will use as it executes. Think of these as... |
; https://docs.microsoft.com/en-us/cpp/porting/overview-of-potential-upgrade-issues-visual-cpp#libraries
includelib legacy_stdio_definitions.lib
extern printf: PROTO fmt:PTR BYTE, :VARARG
extern setlocale: PROTO category:SDWORD, locale:PTR BYTE
.const
fmt db "ACP locale: %s", 0ah, 0
locale db ".ACP", 0
.code
; Set ... |
.code
pal_execute_vmcall_hyperv proc
vmcall;
mov rax, r8;
ret;
pal_execute_vmcall_hyperv endp
end
|
#import "common.asm"
#importonce
.filenamespace c64lib
/*
* Adds 16 bit number "value" to given memory cell specified by "low" address.
*
* MOD: A, C
*/
.macro add16(value, dest) {
clc
lda dest
adc #<value
sta dest
lda dest + 1
adc #>value
sta dest + 1
}
.assert "add16($0102, $A000) ", { add16($0102,... |
; --COPYRIGHT--,BSD_EX
; Copyright (c) 2012, Texas Instruments Incorporated
; All rights reserved.
;
; 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 co... |
; MIDI CPU
; copyright John Staskevich, 2017
; john@codeandcopper.com
;
; This work is licensed under a Creative Commons Attribution 4.0 International License.
; http://creativecommons.org/licenses/by/4.0/
;
; firmwareupdate.asm
;
; Bootloader-over-MIDI-SysEx code.
;
list p=16f887
#include <p16f887.... |
; ***************************************************************************************
; ***************************************************************************************
;
; Name : kernel.asm
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 5th January 2019
; Purpose : M7 Kernel
;
; *************... |
; Arquivo: Factorial.nasm
; Curso: Elementos de Sistemas
; Criado por: Luciano Soares
; Data: 27/03/2017
; Calcula o fatorial do número em R0 e armazena o valor em R1.
|
Sound2B_Swish_Header:
smpsHeaderStartSong 2
smpsHeaderVoiceNull
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cPSG3, Sound2B_Swish_PSG3, $00, $00
; PSG3 Data
Sound2B_Swish_PSG3:
smpsPSGvoice $00
smpsPSGform $E7
dc.b nMaxPSG, $03, nRst, $03, nMaxPSG, $01, smpsNoAttack
Sou... |
setrepeat 2
frame 4, 08
frame 0, 08
dorepeat 1
frame 4, 30
endanim
|
; /*****************************************************************************
; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
; *****************************************************************************
; * Copyright 2021-2022 Marco Spedaletti (asimov@mclink.it)
; *
; * Licens... |
ORG 00000400H
NOP
CLI
STI
PUSH BL
PUSH BX
PUSH EBX
PUSH 12H
PUSH 1234H
PUSH 12345678H
PUSH BYTE PTR [12345678H]
PUSH WORD PTR [12345678H]
PUSH DWORD PTR [12345678H]
PUSH DWORD PTR [EBX]
PUSH DWORD PTR [EBX+01H]
PUSH DWORD PTR [EBX-01H]
PUSH DWORD PTR [EBX+12345678H]
PUSH DWORD PTR ... |
// push constant 7
@7
D=A
@SP
A=M
M=D
@SP
M=M+1
// push constant 8
@8
D=A
@SP
A=M
M=D
@SP
M=M+1
// add
@SP
AM=M-1
D=M
A=A-1
M=M+D
|
// Tests a cast that is not needed
// Commodore 64 PRG executable file
.file [name="cast-not-needed-2.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... |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The MIT License
;
; Copyright (c) 2014 Intel Corporation
;
; Permission is hereby granted, free of charge, to any person
; obtaining a copy of this software and associated documentation
; files (the "Software"), to deal in the Software... |
; void *bit_play_tritone(void *song)
SECTION code_clib
SECTION smc_sound_bit
PUBLIC bit_play_tritone
EXTERN asm_bit_play_tritone
defc bit_play_tritone = asm_bit_play_tritone
|
;;----------------------------------------------------------------------
;; Demo of PSP
;; read the command line bytes from PSP
;; 2015/01/22
;;----------------------------------------------------------------------
org 100h
section .data
copyright db '---------------------------------------', 13, 10, '$'
info1 db... |
;Copyright (c) 2012 Mike Ryan
;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, distribute, subl... |
MACRO
INCR &X,&Y,®=AREG
MOVER ®,&X
ADD ®,&Y
MOVEM ®,&X
MEND
MACRO
SWAP &P,&Q,&R
MOVER &Q,&P
ADD &P,&R
MOVEM &R,&Q
MEND
MACRO
DECR &A,®1=BREG,®2=CREG
MOVER ®1,&A
SUB ®1,®2
MOVEM ®1,&A
MEND
START 100
READ N1
READ N2
INCR N1,N2,REG=CREG
DECR N1,N2
STOP
N1 DS 1
N2 DS 1... |
GLOBAL beep
GLOBAL unBeep
section .text
beep:
push rbp
mov rbp, rsp
mov al, 0xb6
out 0x43, al
mov rax, 0
mov al, 11931
out 0x42, al
mov al, ah
out 0x42, al
in al, 0x61
or al, 0x03
out 61h, al
mov rsp, rbp
pop rbp
ret
unBeep:
;call .pause1
in al, 0x61
... |
Name: wmap.asm
Type: file
Size: 526
Last-Modified: '1991-12-15T15:00:00Z'
SHA-1: 750A429CB9A68579D2C1997D0474A5C3A7DA201B
Description: null
|
; size_t p_stack_size(p_stack_t *s)
SECTION code_clib
SECTION code_adt_p_stack
PUBLIC _p_stack_size
EXTERN _p_forward_list_size
defc _p_stack_size = _p_forward_list_size
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: LaserJet print driver
FILE: printcomPCL4Text.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
PrInitFont ... |
; Reversing a String (RevStr.asm)
; This program reverses a string.
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
aName byte "Abraham Lincoln",0
nameSize = ($ - aName) - 1
.code
main proc
; Push the name on the stack.
mov ecx,nameSize
mov esi,0
L1: movzx eax,... |
; ==================================================================
; Auqa_Seven_OS -- The Aqua_Seven_OS Operating System kernel
;
; KEYBOARD HANDLING ROUTINES
; ==================================================================
; ------------------------------------------------------------------
; os_wait_for_key --... |
db "LEGENDARY@" ; species name
db "An ancient picture"
next "scroll shows that"
next "people were"
page "attracted to its"
next "movement as it ran"
next "through prairies.@"
|
section .text
global rotp
;; void rotp(char *ciphertext, char *plaintext, char *key, int len);
rotp:
;; DO NOT MODIFY
push ebp
mov ebp, esp
pusha
mov edx, [ebp + 8] ; ciphertext
mov esi, [ebp + 12] ; plaintext
mov edi, [ebp + 16] ; key
mov ecx, [ebp + 20] ; ... |
Route2_Script:
jp EnableAutoTextBoxDrawing
Route2_TextPointers:
dw PickUpItemText
dw PickUpItemText
dw Route2Text3
dw Route2Text4
Route2Text3:
TX_FAR _Route2Text3
db "@"
Route2Text4:
TX_FAR _Route2Text4
db "@"
|
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1
include listing.inc
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?kmem_start@@3PEAXEA ; kmem_start
PUBLIC ?kmem_end@@3PEAXEA ; kmem_end
PUBLIC ?last_header@@3PEAUkmem@@EA ; last_header
_BSS SEGMENT
?kmem_start@@3PEAXEA DQ 01H DUP... |
PUBLIC kmreadkbd
.kmreadkbd
call 0xB806
jr c, kmread_1
ld bc, 0xffff
kmread_1:
ld h, b
ld l, c
ret
|
;
; System Call for REX6000
;
; $Id: DbFindRecord.asm,v 1.4 2015/01/19 01:33:06 pauloscustodio Exp $
;
; extern INT DbFindRecord(int, char, char, ... );
;
; Written by Damjan Marion <dmarion@open.hr>
PUBLIC DbFindRecord
.DbFindRecord
sub 3 ;except 1st 3 params
ld b,a
ld ix,2
add ix,sp
.DbFindRecord_1
... |
SECTION "Test",CODE[0]
sbc a,(hl)
sbc a,(ix+$7F)
sbc a,(iy)
sbc a,b
sbc a,c
sbc a,d
sbc a,e
sbc a,h
sbc a,l
sbc a,a
sbc a,-1
sbc hl,bc
sbc hl,de
sbc hl,hl
sbc hl,sp
|
org 0x7c00
bits 16
Start:
cli ; Clear all interrupts
hlt ; halt the system
times 512-($-$$)-2 db 0 ; Count the file size and clear last 2 bytes for signature
dw 0xAA55 ; Boot signature
|
Nickolas Decker
CS51 Spring 2017 HW1
2s -> Decimal
1. -250
2. -17
3. 32751
4. 21845
Unsigned -> Decimal
1. 65286 (32768 + 16384 + 8192 + 4096 + 2048 + 1024 + 512 + 256 + 4 + 2)
2. 65519 (32768 + 16384 + 8192 + 4096 + 2048 + 1024 + 512 + 256 + 128 + 64 + 32 + 8 + 4 + 2 + 1)
3. 32751 ( + 16384 + 8192 + 4096 +... |
EXTRN output_X: near
STK SEGMENT PARA STACK 'STACK'
db 100 dup(0)
STK ENDS
DSEG SEGMENT PARA PUBLIC 'DATA'
X db 'R'
DSEG ENDS
CSEG SEGMENT PARA PUBLIC 'CODE'
assume CS:CSEG, DS:DSEG, SS:STK
main:
mov ax, DSEG
mov ds, ax
call output_X
mov ax, 4c00h
int 21h
CSEG ENDS
PUBLIC X
END m... |
IPCData equ 000Ah ; Offset of the data trasfer area (16 bytes)
%macro IPC_Call 1
mov cl, %1
call IPC
%endmacro
%macro IPC_Enter 0
push cx
push ds
out 0E8h, al
call IPC_GetSeg
%endmacro
%macro IPC_Leave 0
out 0E9h, al
pop ds
pop cx
%endmacro
%macro IPC_Disable_IRQ 0
pushf
... |
; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt
org 100h
include 'emu8086.inc'
.data
greeting2 DB "Welcome to the Encryption Demo program "
DB "created by Kip Irvine.",0dh,0ah,0h
str DB "string",0
.code
LEA SI, greeting2
C... |
; void sp1_DeleteSpr_fastcall(struct sp1_ss *s)
SECTION code_clib
SECTION code_temp_sp1
PUBLIC _sp1_DeleteSpr_fastcall
EXTERN asm_sp1_DeleteSpr
defc _sp1_DeleteSpr_fastcall = asm_sp1_DeleteSpr
|
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
fgetc_cons:
_fgetc_cons:
in a,($fa)
and 1
jp nz,fgetc_cons
in a,($fc)
ld l,a
ld h,0
cp 10
jp nz,not_lf
ld l,13
not_lf:
cp 13
ret nz
ld l,10
ret
|
music_init=$1000
music_play=$1003
irq_setup sei
lda #$7f ; disable CIA timer interrups
sta $dc0d
sta $dd0d
lda $dc0d ; read to get rid of pending interrupts
lda $dd0d
lda #$00 ; raster irq for line 0 (bits 0-7)
sta vic+$12
lda vic+$11 ; for bit 8, clean MSB in register $11
and #$7f
sta vic+$11 ... |
.386
code segment use16 para public 'code'
assume cs: code
start:
mov ax, 3510h ; 获取10h的中断矢量
int 21h ; 段址保存在 es, 偏移址保存在 bx
mov ah, 4ch
int 21h
code ends
end start
|
; AddVariables.asm - Chapter 3 example
.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
.data
firstval DWORD 20002000h
secondval DWORD 11111111h
thridval DWORD 22222222h
sum DWORD 0
.code
main PROC
; x86 doesn't allow you to add one variable directly to another, bu... |
Music_WildBattle_Ch0::
tempo 104
volume 7, 7
duty 3
vibrato 6, 3, 4
toggleperfectpitch
notetype 12, 11, 3
octave 4
C_ 1
octave 3
B_ 1
A# 1
A_ 1
A# 1
A_ 1
G# 1
G_ 1
G# 1
G_ 1
F# 1
F_ 1
F# 1
F_ 1
E_ 1
D# 1
E_ 1
D# 1
D_ 1
C# 1
D_ 1
C# 1
C_ 1
octave 2
B_ 1
octave 3
C_ 1
octave 2
B_ 1
A... |
PUBLIC heapaddress
; fastcall
.heapaddress
ex de, hl
jp 0xb87e
|
# JMH version: 1.19
# VM version: JDK 1.8.0_131, VM 25.131-b11
# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java
# VM options: <none>
# Warmup: 20 iterations, 1 s each
# Measurement: 20 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput... |
cpu 8080
org 100h
lxi d, hellojpg
mvi c, 9
call 5
call cpudetect
mvi c, 9
call 5
ret
hellojpg db "DETECTING CPU TYPE",0dh,0ah,"THE CPU IS: $"
msg_z80 db "Z80$"
msg_8080 db "KP580BM80A$"
msg_vm1 db "KP580BM1$"
cpudetect:
lxi d, msg_z80
xra a
dcr a
rpo
l... |
!source "basic-boot.asm"
+start_at $0900
sei
ldx #$00
ldy #$7f
sty $dc0d
sty $dd0d
lda $dc0d
lda $dd0d
lda #$01
sta $d01a
lda #<.flicker
ldx #>.flicker
sta $314
stx $315
; Line number, would be better ot do this on retrace
lda .ypos
sta $d012
lda $d011
and #$7f
sta $d011
ldx #00
stx bocol
cli
jmp * ; loop here... |
; void *tshr_saddrcdown(void *saddr)
SECTION code_clib
SECTION code_arch
PUBLIC tshr_saddrcdown
EXTERN zx_saddrcdown
defc tshr_saddrcdown = zx_saddrcdown
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _tshr_saddrcdown
defc _tshr_saddrcdown = tshr_saddrcdown
ENDIF
|
\ Write characters to Mode 7 screen
\ Using Indirect Indexing
\ Using BeebASM assembler
\ Help from https://twitter.com/0xC0DE6502
oswrch = &FFEE
screen = &7C00
addr = &70
ORG &2000
.start
.mode
LDA #7 \ Change to Mode 7
JSR screenmode
LDA #65
LDY #24
LDX #20
.loop
JSR mode7_poke
... |
Map_66B4E: dc.w word_66B50-Map_66B4E
word_66B50: dc.w 4
dc.b $E0, $F, 0, 0, $FF, $E0
dc.b $E0, $F, 0, $10, 0, 0
dc.b 0, $F, $18, $10, $FF, $E0
dc.b 0, $F, $18, 0, 0, 0
|
.CODE
xxgetbv PROC
mov ecx, [esp + 4]
xgetbv
; db 0fh
; db 01h
; db d0h
ret
xxgetbv ENDP
END |
.include "engine/video/declarations/capabilities.asm"
.include "engine/video/declarations/colors.asm"
.include "engine/video/declarations/state.asm"
.include "engine/video/declarations/framebuffer.asm"
.include "engine/video/declarations/palette.asm"
.include "engine/video/declarations/draw/pixel.asm"
|
org 0100h
mov ax, 0xB800
mov gs, ax
mov ah, 0x0F
mov al, 'L' ; 0000:黑底 1111:白字
mov [gs:((80 * 0 + 39) * 2)], ax ; 屏幕第0行,第39列
jmp $ ; 到此停住
|
;
; Copyright (c) 2016, Alliance for Open Media. All rights reserved
;
; This source code is subject to the terms of the BSD 2 Clause License and
; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
; was not distributed with this source code in the LICENSE file, you can
; obtain it at www.aome... |
; submitted by Anonymous
ldx #0
ldy #0
;init screen
lda #0
sta $0
lda #2
sta $1
loop:
lda colors,x
bpl ok
inc $0
ldx #0
lda colors,x
ok:
inx
sta ($0),y
iny
bne ok2
inc $1
ok2:
jmp loop
colors:
dcb 0,2,0,2,2,8,2,8,8,7,8,7,7,1,7,1,1,7,1,7,7,8,7,8,8,2,8,2,2,0,2,0
dcb 2,2,8,2,8,8,7,8,7,7,1,7,1,1,1,1,1... |
;;kernel.asm
bits 32 ;nasm directive
32 bit
section .text
global start
extern kmain ;kmain is defined
in the c file
start:
cli ;block interrupts
mov esp, stack_space ;set stack pointer
call kmain
hlt ;halt the CPU
section .bss
resb 8192 ;8KB for stack
stack_space:
|
.filenamespace sl
.namespace extensions {
.function _16bit_next(arg) {
.const val = arg.getValue()
.if (arg.getType() == AT_IMMEDIATE) {
.return CmdArgument(arg.getType(), >val)
} else {
.return CmdArgument(arg.getType(), val + 1)
}
}
.pseudocommand ... |
#!/usr/local/bin/zasm -x -o original/test6-target-default.hex
.org 1000
rst 0
|
;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; PX8 variant by Stefano Bodrato
;
;
SECTION code_clib
PUBLIC xordraw
PUBLIC _xordraw
EXTERN do_draw
.xordraw
._xordraw
ld a,3
jp do_draw
|
; A286016: Signed continued fraction expansion with all signs negative of tanh(1).
; Submitted by Jon Maiga
; 1,5,2,2,2,2,9,2,2,2,2,2,2,2,2,13,2,2,2,2,2,2,2,2,2,2,2,2,17,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,21,2,2,2,2,2,2
lpb $0
add $2,1
sub $0,$2
add $2,3
lpe
add $0,1
lpb $0
gcd $0,1
mov $2,1
lpe
mov $0,$2
add $... |
; 7e08test.asm
global main
extern nbPairGen
section .text
main:
push dword 1337 ; argument 1 (impair)
push dword 42 ; argument 2 (pair)
push dword 5 ; argument 3 (impair)
push dword 17 ; argument 4 (impair)
push dword 11 ; argument 5 (impair)
push dword 10 ; argument 6 (pair)
push dword 41 ;... |
; 10 sys 49152
*=$0801
BYTE $0E, $08, $0A, $00, $9E, $20, $28, $34, $39, $31, $35, $32, $29, $00, $00, $00
*=$c000 ; origin directive (49152)
lda #72 ; load ascii 'h' into the accumulator
jsr $ffd2 ; call chrout kernal subroutine
lda ... |
Func_f1be0:
ld a, [wYCoord]
cp 3
jr z, .asm_f1bf0
ld b, SPRITE_FACING_DOWN
ld hl, Data_f1bf9
call TryApplyPikachuMovementData
ret
.asm_f1bf0
ld b, SPRITE_FACING_LEFT
ld hl, Data_f1bfe
call TryApplyPikachuMovementData
ret
Data_f1bf9:
db $00
db $1f
db $1e
db $38
db $3f
Data_f1bfe:
db $00
db $1d
db $... |
FINSUM MACRO PARA1, PARA2, SUM
PUSH AX
PUSH BX
LOCAL LARGE
LOCAL FINAL
MOV AX, PARA1
MOV BX, PARA2
CMP AX, BX
JG LARGE
SHL BX, 1
JMP FINAL
LARGE:
SHL AX, 1
FINAL:
ADD AX, BX
MOV SUM, AX
POP BX
POP AX
ENDM
DATA SEGMENT
X DW 5
Y DW 10
... |
//A file to test that the assembler works
@16
MD=A;JEQ
(LOOP)
A-D
M=A
(END)
0;JMP
@17
|
; void heap_free_unlocked_callee(void *heap, void *p)
SECTION code_alloc_malloc
PUBLIC heap_free_unlocked_callee
heap_free_unlocked_callee:
pop af
pop hl
pop de
push af
INCLUDE "alloc/malloc/z80/asm_heap_free_unlocked.asm"
|
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
; The following are all of the segments used in the load order
;
;SR; We switch the order of the CODE and DATA segments since we will have to
;... |
cpu 6502
org $c000
START: LDY #0
L1: TYA
STA $0400,Y
INY
BNE L1
RTS
|
;;; Apple II audit routine macros.
;;; Copyright © 2016 Zellyn Hunter <zellyn@gmail.com>
;; string/stringed drops a pointer to a string.
!macro string {
!word LASTSTRING
!set TEMP = *
* = LASTSTRING
}
!macro stringed {
!byte 0
!set LASTSTRING=*
* = TEMP
}
!macro print {
jsr LASTSTRING
!set TEMP = *
* =... |
org $8000
include utils.asm
include bouncingball.asm
main:
call bouncingball
di
halt
end main
|
;ScizorBaseStats: ; 39136 (e:5136)
db DEX_SCIZOR ; pokedex id
db 70 ; base hp
db 130 ; base attack
db 100 ; base defense
db 65 ; base speed
db 80 ; base special
db BUG ; species type 1
db STEEL ; species type 2
db 20 ; catch rate
db 200 ; base exp yield
INCBIN "pic/ymon/scizor.pic",0,1 ; 77, sprite dimensions
dw Scizor... |
kernel: file format elf32-i386
Disassembly of section .text:
80100000 <multiboot_header>:
80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh
80100006: 00 00 add %al,(%eax)
80100008: fe 4f 52 decb 0x52(%edi)
8010000b: e4 .byte 0xe4
8010000c <entry>:
# E... |
;
; ZX Spectrum specific routines
; by Stefano Bodrato, 28/06/2006
;
; Copy a variable to basic
;
; int __CALLEE__ zx_setfloat_callee(char *variable, float value);
;
; $Id: zx_setfloat_callee.asm,v 1.5 2015/01/19 01:33:07 pauloscustodio Exp $
;
PUBLIC zx_setfloat_callee
PUBLIC ASMDISP_zx_setfloat_CALLEE
E... |
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20714
//
//
///
// Note: shader requires additional functionality:
// Double-precision floating point
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ----... |
subu $5,$6,$3
lb $3,3($0)
sra $5,$0,7
xor $5,$3,$3
addu $5,$4,$3
slt $3,$1,$3
sw $3,16($0)
srav $1,$5,$3
srav $0,$3,$3
subu $3,$3,$3
andi $4,$4,59523
slti $1,$2,-3383
lh $3,2($0)
sb $3,9($0)
srl $4,$4,4
addiu $4,$4,-27199
srav $3,$3,$3
srl $3,$3,14
addu $4,$1,$3
andi $3,$3,21162
subu $3,$3,$3
xor $3,$5,$3
addu $5,$5,$3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.