content
stringlengths
23
1.05M
PPU_CTRL = 0x2000 PPU_MASK = 0x2001 PPU_STATUS = 0x2002 PPU_ADDR = 0x2006 PPU_DATA = 0x2007 APU_DMC = 0x4010 APU_FRMCNTR = 0x4017 PPU_CTRL_NMI = 0b10000000 PPU_MASK_LEFTBKG = 0b00000010 PPU_MASK_LEFTSPR = 0b00000100 PPU_MASK_SHOWBKG = 0b00001000 PPU_MASK_SHOWSPR = 0b00010000 VRAM_PALETTE = 0x3f00
; Lab 10 ; name: show_str ; func: display a string of text which ends with 0 at specified position with certain color ; args: (dh) = line(0~24), (dl) = column(0~79) ; (cl) = color, ds:si = where the string begins assume cs:code data segment db 'welcome to masm!',0 data ends stack segment dd 0,0 dd 0,0 stac...
<% from pwnlib.shellcraft import amd64, pretty %> <%docstring>Copies memory. Args: dest: Destination address src: Source address n: Number of bytes </%docstring> <%page args="dest, src, n"/> /* memcpy(${pretty(dest)}, ${pretty(src)}, ${pretty(n)}) */ cld ${amd64.setregs({'rdi': dest, 'rsi': src...
; A023798: Xenodromes: all digits in base 3 are different. ; Submitted by Jon Maiga ; 0,1,2,3,5,6,7,11,15,19,21 mov $2,$0 add $2,1 lpb $2 mov $0,$1 div $0,2 seq $0,136692 ; Final nonzero digit of n! in base 5. add $1,$0 sub $2,1 lpe mov $0,$1 sub $0,1
test1/test1.elf: file format elf32-littlearm Disassembly of section .text: 00000000 <hang-0x80>: 0: 00002000 .word 0x00002000 4: 00000091 .word 0x00000091 ... 10: 00000080 .word 0x00000080 14: 00000080 .word 0x00000080 18: 00000080 .word 0x00000080 1c: 00000080 .word 0x00000080 20: 000000...
.text ori $s0, $0, 0x1c01 mtc0 $s0, $12 go: nop j go nop .ktext 0x00004180 ori $k0, $0, 0x7f40 lw $k1, 0($k0) beq $k1, $0, return ori $k0, $0, 0x7f2c lw $t0, 0($k0) ori $t2, $0, 0x0001 beq $t2, $k1, opt_1 ori $a0, $0, 0 nop j return nop opt_1: sw $t0, 0x7f38 lw $k0, 0x7f20 #andi $k0, $k0, 0x0020 #beq $k0, $0...
.class Sample:Obj .method $constructor .local i .local j .local cat const 13 const 42 Call Int:plus store i const 32 load i Call Int:sub store j load j Call Int:print const "Nora" store cat load cat Call String:print return 0
;test most of the logical instructions NAME Logical TITLE logical ASSUME CS:CODE CODE SEGMENT START: MOV AX,0505H MOV BX,C0C0H MOV CX,1122H AND AX,BX OR AX,BX XOR AX,BX NOT CX NEG AX CMP AX,1000H TEST AX,B...
db DEX_SALAZZLE ; pokedex id db 68 ; base hp db 64 ; base attack db 60 ; base defense db 117 ; base speed db 111 ; base special db POISON ; species type 1 db FIRE ; species type 2 db ETHER ; catch rate 80 db 57 ; base exp yield INCBIN "pic/ymon/frontsalazzle.pic",0,1 ; sprite dimensions dw SalazzlePicFront ...
#importonce .filenamespace c64lib /* * MOS6510 Registers. */ .label MOS_6510_DIRECTION = $00 .label MOS_6510_IO = $01 /* * I/O Register bits. */ .label CASETTE_MOTOR_OFF = %00100000 .label CASETTE_SWITCH_CLOSED = %00010000 .label CASETTE_DATA = %00001000 .label PLA_CHAREN...
[GLOBAL gdt_flush] gdt_flush: mov eax, [esp+4] lgdt [eax] mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax jmp 0x08:.flush ; 0x08 offset to code segment .flush: ret [GLOBAL tss_flush] tss_flush: mov ax, word [esp+4] ltr ax ret
; ************************************************************************************************ ; ************************************************************************************************ ; ; Name: search.asm ; Purpose: Search for token in the token tables ; Created: 8th March 2021 ; Reviewed: 16th Marc...
cpu 8086 org 0h dw 0 mov ax, 0 mov ss, ax mov sp, ax popf ; Flags mov bx, word 0 ; BX mov cx, word 0 ; CX mov dx, word 0 ; DX mov ax, word 0 ; SS mov ss, ax mov ax, word 0 ; DS mov ds, ax mov ax, word 0 ; ES mov es, ax mov ax, word 0 ; SP mov sp, ax mov ax, word 0 ; BP mov bp, ax mov ax, word 0 ...
PAGE , 132 .386p ;****************************************************************************** ; ; (C) Copyright MICROSFT Computer Corp. 1989-1991 ; (C) Copyright COMPAQ Computer Corp. 1989-1991 ; ; Title: EMM386.EXE - MICROSOFT Expanded Memory Manager 386 ; ; Module: SEGEND.ASM - For defining the end location of th...
; define here snake constant values SECTION "Snake", ROM0 ; TileBegin equ 151 ; TileEnd equ 170 Snake_Load: LD A, $20 ; 80 in decimal LD [posY], A ld a, $10 ; 16 in decimal LD [posX], A ld a, 0 ld [snake_frames], a ; load sprite LD A, [posY] LD [_OAMRAM], A LD A, [posX] LD [_OA...
# ORG 8000 MVI H,34 // load by question MVI D,12 // load by question MVI A,99 // for 10s complement SUB D // sub for complement INR A // 10s complement obtained ADD H // adds 10s complement of D and H DAA // convert Hex to BCD MOV H,A // moved final answer to H ,as question HLT
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: uiRecalc.asm AUTHOR: Gene Anderson, Aug 4, 1992 ROUTINES: Name Description ---- ----------- INT SSRC_ObjMessageSend Update UI ...
EXTERN schedule EXTERN _cli EXTERN _sti EXTERN putnString GLOBAL tick_handler section .text tick_handler: MOV RDI, RSP CALL schedule CMP RAX, 0 JE cont_switch_end MOV RSP, RAX cont_switch_end: mov rdi, cadena mov rsi, longitud call putnString RET section .data cadena db "retorne",10 l...
; zSTRING __thiscall zCPlayerInfo::GetName(void) ; Re-implement zCPlayerInfo::GetName to return empty string global zCPlayerInfo__GetName_empty zCPlayerInfo__GetName_empty: resetStackoffset %assign arg_1 +0x4 ; zSTRING * %assign arg_total 0x4 ...
counter EQU $8650 org $d000 install: ld hl, 0 ; azzera il contatore ld (counter), hl ; ld hl, timer ; carica in HL l'indirizzo della routine di ; disabilita gli interrupt momentaneamente ld (0x8013), hl ; scrive l'indirizzo della routine ld a, $c3 ...
DEFAULT REL extern printf extern scanf extern fflush extern usleep global main section .data _fmin db "%ld", 0 x db 0 y db 0 a db 0 i db 0 section .text _input: push rbp mov rbp, rsp sub rsp, 32 lea rax, [rbp - 8] mov rcx, _fmin mov rdx, rax call scanf mov rax, [rbp - 8] leave ret main: push rbp mov rax, [x] mov [y], r...
stm8/ #include "Button.inc" segment 'rom' INTEL ; --------------------------------- ; name : void Button_Init() ; params: ; ; return: ; ================================= ; void Button_Init() ; { ; ... ; } ; --------------------------------- .Button_Init.w push cc Button_Init_start: Button_Init_Floor: ;; PD...
SECTION .DATA good: db 'good',10 txtlen: equ $-good SECTION .TEXT GLOBAL _start _start: mov eax,4 mov ebx,1 mov ecx,good mov edx,txtlen int 80h mov eax,1 mov ebx,0 int 80h
; void w_vector_empty_fastcall(w_vector_t *v) SECTION code_clib SECTION code_adt_w_vector PUBLIC _w_vector_empty_fastcall EXTERN asm_w_vector_empty defc _w_vector_empty_fastcall = asm_w_vector_empty
; public MIDI interface routines: ; midiDetect ; midiInit ; midiRead ; midiWrite ; interface type for midiDetect and midiInit: ; 0: no MIDI interface was detected ; 1: Sequential Circuits Inc. ; 2: Passport & Syntech ; 3: DATEL/Siel/JMS ; 4: Namesoft ;BUFFER_SIZE_MASK equ #$1F ; original size BUFFER_SIZE_MASK equ #...
FinalBoss_Header: sHeaderInit ; Z80 offset is $8000 sHeaderPatch FinalBoss_Patches sHeaderCh $06, $03 sHeaderTempo $01, $57 sHeaderDAC FinalBoss_DAC sHeaderFM FinalBoss_FM1, $00, $10 sHeaderFM FinalBoss_FM2, $00, $0E sHeaderFM FinalBoss_FM3, $00, $10 sHeaderFM FinalBoss_FM4, $00, $10 sHeaderFM FinalBoss_...
SECTION code_clib PUBLIC im1_init PUBLIC _im1_init EXTERN im1_install_isr EXTERN asm_im1_handler im1_init: _im1_init: di ld hl,($f302) ;System handler ld (fw_interrupt),hl push hl call im1_install_isr pop bc ld hl,asm_im1_handler ld ($f302),hl ei ret SECTION bss_crt fw_interrupt: defw 0 SECTI...
page ,132 ;*****************************************************************************; ; ; ; FILE NAME: dossetat.asm ; ; ; ; DESCRIPTION: MS-DOS set file attribute function 4301H ; ; ; ; NOTES: ; ; ; ; HISTORY: ...
.model small .data ;ruta db 64 dup ("$") saludo db "hola mundo",10,13,'$' namepar db 20 dup ('$') .code main proc far mov ax,@data mov ds,ax mov ah,00h mov al,12h int 10h mov ah,0ch mov al,10h mov bh,00h mov cx,04h mov dx,00h int 10h call salir main endp ...
org 100h L1: NOP L2: MOV AX, 100 MOV CX, AX L3: MOV BL, 02H DIV BL MOV AX, CX MOV BL, 04H DIV BL MOV AX, CX MOV BL, 08H DIV BL MOV AX, CX MOV BL, 10H DIV BL L4: HLT ret
; Questão 4 da lista de exercícios #INCLUDE<P16F84A.INC> ESTADO EQU 0x20 DIGITO1 EQU 0x21 DIGITO2 EQU 0x22 DIGITO3 EQU 0x23 DIGITO4 EQU 0x24 ORG 0x00 GOTO INICIO ORG 0x04 GOTO INTER INICIO CLRW CLRF PORTB CLRF PORTA BSF STATUS,RP0 MOVLW 0 M...
ORG 2000H MVI A, 97H MVI B, 32H SUB B MOV C, A HLT
INCLUDE "./src/include/hardware.inc" INCLUDE "./src/include/util.inc" INCLUDE "./src/include/hUGE.inc" INCLUDE "./src/definitions/definitions.inc" ; UI Tile Index DEF UTI_LOSE_REASON_EN EQU $89 DEF UTI_LOSE_REASON_JP EQU $82 SECTION "Lose Screen WRAM", WRAM0 wLoseReason:: ds 1 wBGMTimer: ds 2 SECTION "Lose ...
; ; Question 5. Implementation of print_hex. ; [org 0x7c00] ; Tell assembler where we will be loaded into memory. mov dx, 0x1fb6 ; store the value to print in dx call print_hex ; call the function jmp $ ; Infinite loop. ; prints the value of DX as hex. print_hex: ; FYI: This routine always converts and prints 4 ni...
; Provided under the CC0 license. See the included LICENSE.txt for details. ; y and a contain multiplicands, result in a mul8 sty temp1 sta temp2 lda #0 reptmul8 lsr temp2 bcc skipmul8 clc adc temp1 ;bcs donemul8 might save cycles? skipmul8 ;beq donemul8 might save cycles? asl temp1 bne rept...
; A test to make sure unsafe optimizations for SDCC are not applied when the sdcc dialect is selected .org #4000 ld hl, 10 ld a,l ld hl, 20 ld (hl), a loop: jr loop
DATA SEGMENT STR DB 'MALAYALAM' MES1 DB "PALINDROME $" MES2 DB "NOT PLAINDROME $" DATA ENDS PRINT MACRO MES MOV AH,09H LEA DX,MES INT 21H INT 3H ENDM EXTRA SEGMENT STOR DB 9 DUP(?) EXTRA ENDS CODE SEGMENT ASSUME CODE : CS , DATA:DS,...
.psx .create "output.bin", 0 .region 20h .word 1,2,3,4 .endregion .autoregion .notice "Allocated at " + tohex(.) .word 5 .endautoregion .autoregion .notice "Allocated at " + tohex(.) .word 6 .endautoregion .autoregion .notice "Allocated at " + tohex(.) .word 7 .endautoregion .autoregion .notice "Allocated at " + ...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (c) Copyright GeoWorks 1988-1995. All Rights Reserved. GEOWORKS CONFIDENTIAL PROJECT: GEOS MODULE: SpecUI/CommonUI/CView FILE: cviewPaneGeometry.asm ROUTINES: Name Description ---- ----------- ?? INT GetPaneMargins...
list p=16f628a, free #include <p16f628a.inc> ERRORLEVEL -302 ;removes warning message about using proper bank that occured on the line 'CLRF TRISB' #include util_macros.INC ; Address Locations ; ; 2-Line Display LCD ; Line 1: 00 hex, 01 hex, 02 hex,........... ...
// // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 // // /// // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // /...
adcb $0xFF, %al adcw $0xFF, %ax adcl $0xFF, %eax adcq $0xFF, %rax adcb %bl, %al adcw %bx, %ax adcl %ebx, %eax adcq %rbx, %rax
*************** * Maze249 * 1 byte free. **************** include <includes/hardware.inc> include <macros/suzy.mac> include <macros/help.mac> IFD LNX USE_BKPT equ 0 ELSE USE_BKPT equ 0 ENDIF MACRO HANDY_BRKPT nbkpt set nbkpt+1 IF USE_BKPT = 1 cpx $5aa5 dc.b $...
MoveTutor: call FadeToMenu call ClearBGPalettes call ClearScreen call DelayFrame ld b, SCGB_PACKPALS call GetSGBLayout xor a ld [wItemAttributeParamBuffer], a call .GetMoveTutorMove ld [wNamedObjectIndexBuffer], a ld [wPutativeTMHMMove], a call GetMoveName call CopyName1 farcall ChooseMonToLearnTMHM jr c...
org $0000 ; Object types OBJECT_NONE EQU 0 OBJECT_SWITCH EQU 1 OBJECT_DOOR EQU 2 OBJECT_DOOR_DESTROY EQU 3 OBJECT_FLOOR_DESTROY EQU 4 OBJECT_WALL_DESTROY EQU 5 OBJECT_BOX_LEFT EQU 6 OBJECT_BOX_RIGHT EQU 7 OBJECT_JAR EQU 8 OBJECT_TELEPORTER EQU 9 ; Pickable object types OBJECT_KEY_GREEN EQU 11 OBJECT_KEY_BLUE EQU...
;FACTORIAL DATA SEGMENT DATA1 DB 23H DATA2 DW 1234H DATA3 DB 0H DATA4 DW 0H DATA5 DW 2345H,6789;ARRAY DATA ENDS ;DIFFERENT DATA IN DATA SEGMENT CODE SEGMENT ASSUME CS : CODE , DS : DATA MOV AX,DATA ; INITIALISE DS TO POINT TO START OF THE...
LCGeoback label byte word C_BLACK Bitmap <71,100,BMC_PACKBITS,BMF_4BIT or mask BMT_MASK> db 0x00, 0x1f, 0xfa, 0xff, 0x00, 0xf0 db 0x01, 0xdd, 0xd0, 0xe1, 0x00, 0x01, 0xdd, 0xd0 db 0x00, 0x7f, 0xfa, 0xff, 0x00, 0xfc db 0x01, 0xd0, 0x02, 0xe1, 0x22, 0x01, 0x00, 0xd0 db 0x00, 0x7f, 0xfa, 0xff, 0x00, 0xfc d...
addi $s1, $0, 0xacdb addi $s2, $0, 0x7f7f7f7f mult $s1, $s2 mfhi $t1 mflo $t2 div $s2, $s1 mfhi $t3 mflo $t4
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: Calculator Accessory -- Manager FILE: calc.asm AUTHOR: Adam de Boor, Mar 13, 1990 REVISION HISTORY: Name Date Description ---- ---- ---------...
GinaAskNumber1Text: text "Whenever I see a" line "strong trainer, I" para "want to be their" line "cheerleader." para "When I'm on my" line "walk, I sometimes" cont "pick up items." para "If I get anything," line "you can have it!" para "Want to give me" line "your number?" para "I'll call as soon" li...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: graphics kernel FILE: Graphics/grRegion AUTHOR: Jim DeFrisco, Doug Fults ROUTINES: Name Description ---- ----------- GrSetClipRect...
jmp a .org 0x22 // Timer/Counter1 Compare Match A jmp timer_interrupt .org 0x32 // USART1 Rx Complete jmp rx_interrupt .org 0x4C main: // Stack init ldi r16, low(RAMEND) ldi r17, high(RAMEND) out SPL, r16 out SPH, r17 // Timer init (PWM, phase and frequency Correct), 1024 prescaler ldi r16, (1<<WGM10) | (0<<WG...
main: nor $s0, $0, $0 sra $s1, $s0, 2 sra $s2, $s0, 4
.offset $8000 FIRST_VALUE = #0 ; First Fibonacci number SECOND_VALUE = #1 ; Second Fibonacci number init: ldx FIRST_VALUE ldy SECOND_VALUE print: sti $01 #%01 ; set mode to print number stx $00 ; print the value of the X register sti $01 #%00 ; set mode to print ascii sti $00 '\n' ; pri...
SECTION code_fp_math32 PUBLIC acos_fastcall EXTERN _m32_acosf defc acos_fastcall = _m32_acosf ; SDCC bridge for Classic IF __CLASSIC PUBLIC _acos_fastcall defc _acos_fastcall = _m32_acosf ENDIF
mac: MACRO println "'mac \#':" for i, _NARG println strfmt("\\%d: <\1>", i+1) shift endr println ENDM mac /* block ...comment */ ; comment mac /*a*/ 1 , 2 /*b*/ , ; trailing comma mac \ c, d mac 1, 2 + /* another ; ; comment */ 2, 3 mac a ...
* Formular Parser 19/12-91 * - entry point * * Development History: * * v 1.00 - first version * v 1.01 03/06-92 * - no parser info area required * - works with "real" QDOS strings * v 1.02 18/08-94 * - error with lists of calculations removed include win1_spread_fpars_keys include win1_mac_oli i...
TITLE DOS_DUP - Internal SFT DUP (for network SFTs) NAME DOS_DUP ;** Low level DUP routine for use by EXEC when creating a new process. Exports ; the DUP to the server machine and increments the SFT ref count ; ; DOS_DUP ; ; Modification history: ; ; Created: ARR 30 March 1983 .xlist .xcref inc...
; ; Philips VG5000 Routines ; ; Print character to the screen ; ; Jun. 2014 -Joaopa, Stefano Bodrato ; ; ; $Id: fputc_cons.asm,v 1.7 2016/06/16 19:40:21 dom Exp $ ; SECTION code_clib PUBLIC fputc_cons_native ; ; Entry: char to print ; DEFC ROWS=25 DEFC COLUMNS=40 defc ROW = $4805 defc COLUM...
; char *strrev(char *s) SECTION code_clib SECTION code_string PUBLIC strrev EXTERN asm_strrev defc strrev = asm_strrev
; Compare which is faster, two times vaddpd with operands from memory, or one vmovdqa ; and two vaddpd with register operand. ; ; Author: Daan Sprenkels <hello@dsprenkels.com> %include "bench.asm" section .rodata: _bench1_name: db `squeeze_separate_load\0` _bench2_name: db `squeeze_immediate_load\0` _bench3_name: db...
ConstVals segment readonly align(64) 'const' AbsMaskF64 qword 8 dup(7fffffffffffffffh) ConstVals ends .code ; void AVX512_Packed_Math_Double_(const ZmmVal * a, const ZmmVal * b, ZmmVal result[8]) AVX512_Packed_Math_Double_ proc vmovapd zmm0, zmmword ptr [rcx] vmovapd zmm1, zmmword ptr [rdx] ; Addition vaddpd zmm...
; Application Processor (AP) startup code - 64-bit part. ; [BITS 64] SEGMENT .pretext EXTERN proc_mp_ap_startup GLOBAL asm_proc_mp_ap_startup asm_proc_mp_ap_startup: ; Set up a suitable stack, then call the main code. Remember that this is linked lower-half, but the main kernel code ; is linked higher half, so thi...
; uchar errno_from_esxdos(uchar code) SECTION code_clib SECTION code_esxdos PUBLIC errno_from_esxdos EXTERN asm_errno_from_esxdos defc errno_from_esxdos = asm_errno_from_esxdos ; SDCC bridge for Classic IF __CLASSIC PUBLIC _errno_from_esxdos defc _errno_from_esxdos = errno_from_esxdos ENDIF
%include "../utils/printf32.asm" struc my_struct int_x: resb 4 char_y: resb 1 string_s: resb 32 endstruc section .data string_format db "%s", 10, 0 int_format db "%d", 10, 0 char_format db "%c", 10, 0 sample_obj: istruc my_struct at int_x, dd 1000 at char_y...
; 각종 레지스터와 세그먼트 상태를 백업하는 매크로 %macro SEG_REG_SAVE 0 push ebp mov ebp, esp push eax push ebx push ecx push edx push esi push edi push gs push fs mov ax, es push ax mov ax, ds push ax mov ax, DataDescriptor mov es, ax %endmacro ; 각종 레지스터와 세그먼트 상태를 복구하는 매크로 ...
section .data: .dec WELCOME 0x10Welcome to the NAVM example! Type help to access the help menu, or exit to quit.0x10 .dec PROMPT $~> / .dec INVALID Invalid command : / .dec BLANK 0x10/ .dec INFOCMD info .dec INFOMAN info | displays session info .dec INFORES NAVM 0.0.1 .dec HELPCMD help ...
db "BIVALVE@" ; species name dw 411, 2920 ; height, weight db "Even a missile" next "can't break the" next "spikes it uses to" page "stab opponents." next "They're even hard-" next "er than its shell.@"
SECTION code_driver SECTION code_driver_terminal_output PUBLIC term_01_output_char_oterm_msg_scroll term_01_output_char_oterm_msg_scroll: ; * OTERM_MSG_SCROLL ; ; enter : c = number of rows to scroll ; can use: af, bc, de, hl ; ; Scroll the window upward 'c' character rows. ; ; A pointer to a recta...
#include "p16f84a.inc" ; CONFIG ; __config 0x3FFA __CONFIG _FOSC_HS & _WDTE_OFF & _PWRTE_OFF & _CP_OFF cblock 0x0C DELAY1 DELAY2 endc org 0x00 start bsf STATUS, RP0 bsf TRISA, TRISA0 clrw movlw 0x00 andwf TRISB ...
DEFINE equs "mac: MACRO\nPRINTLN \"Hello :D\"\nENDM" DEFINE mac
; ; jcqntint.asm - sample data conversion and quantization (non-SIMD, integer) ; ; 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 *no...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1997. All rights reserved. GEOWORKS CONFIDENTIAL PROJECT: PC GEOS MODULE: Calendar/DayEvent FILE: dayeventSentToList.asm AUTHOR: Jason Ho, Jan 31, 1997 ROUTINES: Name Description ---- -----...
; ; Galaksija C Library ; ; Print character to the screen ; ; Stefano Bodrato - Apr.2008 ; ; ; $Id: fputc_cons.asm,v 1.3 2016-05-15 20:15:45 dom Exp $ ; SECTION code_clib PUBLIC fputc_cons_native .fputc_cons_native ld hl,2 add hl,sp ld a,(hl) cp 12 jr nz,nocls .nocls ; Some undercas...
; "wobbles" (more like staccatos) screen's yscroll !source "basic-boot.asm" +start_at $0900 lda #$00 .loop ; Wait for vsync cmp $d012 bne .loop ; Only alter yscroll on every nth frame dec .framecount cmp .framecount bne .loop ; Reset counter lda #$2a ; number of frames to skip ; I've tried re...
ori $8, $zero, 0x01 # $8 = 1 sll $8, $8, 31 # $8 = 0x80000000 sra $8, $8, 31 # $8 = 0xFFFFFFFF
-- 7 Billion Humans (2053) -- -- 34: Seek and Destroy 1 -- -- Author: tiansh -- Size: 28 -- Speed: 13 mem1 = nearest datacube mem4 = nearest shredder step n step n step n step n if c < mem1: mem1 = set c endif step n if c < mem1: mem1 = set c endif step n if c < mem1: mem1 = set c endif step n if c < mem1: mem1 =...
; __ __ __ __ __ __ ; /\ "-.\ \ /\ \/\ \ /\ \ /\ \ ; \ \ \-. \ \ \ \_\ \ \ \ \____ \ \ \____ ; \ \_\\"\_\ \ \_____\ \ \_____\ \ \_____\ ; \/_/ \/_/ \/_____/ \/_____/ \/_____/ ; ______ ______ __ ______ ______ ______ ; /\ __ \ /\ == \ /\ ...
/* * Put a character to the serial port */ .macro PUTC, char push %eax // save push %edx mov $0x3fd, %edx // control register for com1 1: in (%dx), %al // read status into AL test $0x20, %al // check for ready je 1b // keep trying mov $0x3f8, %edx // ...
; DV3 PC Compatible Floppy Disk Write Sector  1993 Tony Tebby section dv3 xdef fd_wphys ; write sector (physical layer) xref fd_cmd_rw xref fd_stat xref fd_fint xref.l fdc_stat xref.l fdc_data xref.s fdc.intl include 'dev8_keys_err' include 'dev8_dv3_keys' include 'dev8_dv3_fd_keys' include 'dev...
Name: kart-calc-d.asm Type: file Size: 23670 Last-Modified: '1992-07-15T00:55:06Z' SHA-1: 583F8212455B4E6C24A4850B0AFDD5F64303830F Description: null
main: lodd count: ; Get count. jneg done: ; See if we are done yet. subd one: ; remove 1 to keep counting to -1. stod count: ; update count. lodd test: ; Get the first fib number to test. pshi ; push it onto the stack. addd one: ...
dc.l $00000000 dc.l $00000005 dc.l $00000056 dc.l $00005555 dc.l $00055675 dc.l $00058667 dc.l $00588667 dc.l $00568667 dc.l $00566667 dc.l $05555767 dc.l $55675577 dc.l $56867575 dc.l $56867556 dc.l $56667968 dc.l $55677566 dc.l $05555555 dc.l $000...
// Tests Krill Loader // Load a file to memory using the Krill loader // The krillload.ld link file creates a D64 disk image containing the executable and the sprite. // To execute the program succesfully you must mount the D64 disk image and execute the krillload.PRG program // Create a D64 disk containing the progr...
; general comments ; Write a program to compute the volume of a triangular prism. ; Define a procedure who's prototype in C would look like ; unsigned int triangularPrismVolume(unsigned int height, unsigned int length , unsigned int width); ; Where 1 <= height, length, width <= 100 ; Use the formula V = (...
; ASM data file from a ZX-Paintbrush picture with 256 x 256 pixels (= 32 x 32 characters) ; and an attribute area of 1024 bytes ; block based output of pixel data - each block contains 8 x 8 pixels ; blocks at pixel positionn (y=0): defb 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 defb 0x46 defb 0x00, 0x...
ori $ra,$ra,0xf multu $5,$2 mtlo $4 mflo $5 srav $1,$4,$4 sb $1,13($0) srav $1,$4,$1 addu $4,$4,$4 mflo $3 sb $4,14($0) divu $1,$ra srav $2,$2,$2 lui $3,24437 sll $1,$2,30 mult $1,$1 multu $1,$4 lb $4,13($0) mflo $4 divu $4,$ra divu $6,$ra mthi $3 addiu $5,$4,11747 mthi $3 mflo $5 srav $0,$1,$1 mtlo $1 srav $1,$1,$1 di...
; ; ANSI Video handling for the Sharp PC G-800 family ; ; Stefano Bodrato - 2017 ; ; ; BEL - chr(7) Beep it out ; ; ; $Id: f_ansi_bel.asm $ ; SECTION code_clib PUBLIC ansi_BEL .ansi_BEL ld BC,0x7f18 _bel_loop: ld A,0x80 out (C), A call _wait xor A out (C), A call _wait djnz _bel_loop ret _w...
;================================================================================ ; RNG Fixes ;-------------------------------------------------------------------------------- RigDigRNG: LDA $7FFE01 : CMP.l DiggingGameRNG : !BGE .forceHeart .normalItem JSL $0DBA71 ; GetRandomInt RTL .forceHeart LDA $7FFE00 : BNE ....
;;; average.asm ;;; Taken from the nasm tutorial https://cs.lmu.edu/~ray/notes/nasmtutorial/ ; void add_four_floats(float x[4], float y[4], float out[4]) ; out[i] = x[i] + y[i] for i in range(0..4) global add_four_floats section .text add_four_floats: movdqa xmm0, [rdi] ; all four values of x ...
global ___load_gdtr ___load_gdtr: push ebp mov ebp, esp mov eax, [ebp+8] sgdt [eax] pop ebp ret global ___inb ___inb: push ebp mov ebp, esp mov dx, [ebp+8] in al, dx pop ebp ret global ___outb ___outb: push ebp mov ebp, esp mov dx, [ebp+8] mov al,...
print_str: pusha ;push all registers onto the stack str_loop: mov ah, 0x0E ;14 in decimal, enable TTY mov al, [si] ;move the address of si into al cmp al, 0 ;compare al to end of string (0). jne print_char ;if al is not equal to zero, jmp to print_char popa ;else, pop all registers off the stack... ret ;...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: utilsGroup.asm AUTHOR: Chris Boyke METHODS: Name Description ---- ----------- FUNCTIONS: Scope Name Description ----- ---- ------...
/* scheme/is_sob_void.asm * Take pointers to a Scheme object, and places in R0 either 0 or 1 * (long, not Scheme integer objects or Scheme boolean objets), * depending on whether the argument is void. * * Programmer: Mayer Goldberg, 2010 */ IS_SOB_VOID: PUSH(FP); MOV(FP, SP); MOV(R0, FPARG(0)); CMP(IND...
section .asm global load_idt ; Load the IDT info into the IDT Register ; ; @param ebp + 8 - Address of IDT register structure load_idt: push ebp mov ebp, esp mov ebx, [ebp + 8] lidt [ebx] pop ebp ret
section data zero: const 0 2teste: const 2 ;token invalido pois comeca com numero tres/: const 3 ; token invalido apresenta caracter diferente de letra, numero ou _ section text add 2teste add tres div dois
data segment input db 100,100 dup(0) string1 db 0dh,0ah,'please input your strings',0dh,0ah,'$' string2 db 0dh,0ah,'the strings you input are:',0dh,0ah,'$' string3 db 0dh,0ah,'Do you want to continue (y/n):',0dh,0ah,'$' data ends stacks segment stack db 256 dup(0) stacks ends code segment assume ...
#Adds two values together using a constant as an operand #Run and look at the $t0 and $t2 registers li $t0, 0x2d #Loads the constant 0x2d (45) to $t0 addi $t2, $t0, 0x4f #$t2 = $t0 + 79 #Result is 0x7c (124)
.text main: addi $t0, $zero, 0x3000 #base reg sw $0, 0($t0) #initialize to 0 sw $0, 4($t0) #initialize to 0 sw $0, 8($t0) #initialize to 0 sw $0, 12($t0) #initialize to 0 sw $0, 16($t0) #initialize to 0 sw $0, 20($t0) #initialize to 0 addi $t1, $zero, 1 #set bit sll $a1, $t1, 16 #score bit=1 sll $a2, $t1, 17 #...
MOVIL r8 48 # frame pointer = 48 .main MOVIL r0 5 # x = 5 MOVIL r1 4 # y = 4 CMPI r0 10 # x < 10 MOVIL r9 7 # .L2 JGT r9 MOVIL r1 3 # y = 3 .L2 CMPI r1 4 # y > 4 MOVIL r10 11 # .L3 JLT r10 MOVIL r0 4 # x would be 4, but this shouldn't e...