content stringlengths 5 918k | size int64 5 918k | lang stringclasses 1
value | ext stringclasses 3
values | avg_line_length float64 1.67 3.94k | max_line_length int64 3 3.94k | alphanum_fraction float64 0.08 0.95 | hexsha stringlengths 40 40 | max_stars_repo_name stringlengths 7 71 | max_stars_repo_licenses listlengths 1 6 | max_stars_count int64 1 26.9k ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|
; A180119: a(n) = (n+2)! * Sum_{k = 1..n} 1/((k+1)*(k+2)).
; 0,1,6,36,240,1800,15120,141120,1451520,16329600,199584000,2634508800,37362124800,566658892800,9153720576000,156920924160000,2845499424768000,54420176498688000,1094805903679488000,23112569077678080000,510909421717094400000,11802007641664880640000,284372184127734743040000,7135156619932253552640000,186134520519971831808000000,5041143264082570444800000000,141555302855438578089984000000,4115992652258137116770304000000,123784667912355827363610624000000,3846166467276770350226472960000000,123342579812668842265883443200000000
mov $1,$0
mov $2,$0
pow $2,2
add $0,$2
mod $0,1024
div $0,2
lpb $1
mul $0,$1
sub $1,1
lpe
| 679 | Assembly | asm | 48.5 | 524 | 0.832106 | f700161a95f9a24839ebe185e126e5a9f81eb0e8 | neoneye/loda | [
"Apache-2.0"
] | 22 |
; size_t w_vector_erase_callee(w_vector_t *v, size_t idx)
SECTION code_clib
SECTION code_adt_w_vector
PUBLIC _w_vector_erase_callee
EXTERN _w_array_erase_callee
defc _w_vector_erase_callee = _w_array_erase_callee
| 218 | Assembly | asm | 18.166667 | 57 | 0.866972 | f7003de408ef2565cbe16c08f1a335ad1d5f395d | jpoikela/z88dk | [
"ClArtistic"
] | 640 |
PROGRAM 4
BR L1
L0:
PROC 1
LDLADDR 8
LDCB 1
STOREB
LDLADDR 8
LOADB
PUTBYTE
LDCSTR " "
PUTSTR
RET 0
L1:
LDGADDR 0
LDCINT 5
STOREW
CALL L0
LDGADDR 0
LOADW
PUTINT
PUTEOL
HALT
| 237 | Assembly | asm | 9.875 | 15 | 0.556962 | f7006af344336f589e0d6bb6d4dc9196a630c80d | SoftMoore/CPRL-Kt | [
"Unlicense"
] | 6 |
; size_t b_array_erase_block(b_array_t *a, size_t idx, size_t n)
SECTION code_clib
SECTION code_adt_b_array
PUBLIC b_array_erase_block
EXTERN asm_b_array_erase_block
b_array_erase_block:
pop af
pop de
pop bc
pop hl
push hl
push bc
push de
push af
jp asm_b_array_erase_block
| 315 | Assembly | asm | 13.125 | 64 | 0.736508 | f7006b953eb42413b146284ce21ecf529271b419 | teknoplop/z88dk | [
"ClArtistic"
] | 8 |
COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Item (Sample PC GEOS application)
FILE: list.asm
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/1/92 Initial version
DESCRIPTION:
This file source code for the Item application. This code will
be assembled by ESP, and then linked by the GLUE linker to produce
a runnable .geo application file.
RCS STAMP:
$Id: list.asm,v 1.1 97/04/04 16:34:28 newdeal Exp $
------------------------------------------------------------------------------@
;------------------------------------------------------------------------------
; Structure Definitions
;------------------------------------------------------------------------------
;######################################################################
ListNode struc
LN_value word ; numeric data for the node
LN_next lptr.ListNode ; chunk handle of next ListNode
ListNode ends
;######################################################################
;------------------------------------------------------------------------------
; Initialized Variables
;------------------------------------------------------------------------------
idata segment
;######################################################################
itemListHead lptr.ListNode ; chunk handle of 1st item in list
;######################################################################
idata ends
;------------------------------------------------------------------------------
; Code
;------------------------------------------------------------------------------
ItemCommonCode segment resource ;start of code resource
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemInitializeList
DESCRIPTION: Initialize our ItemList as follows:
Create a global memory block
Set up the LMemHeader structure at the beginning
of that block.
< ANYTHING ELSE THAT IS NECESSARY >
CALLED BY: ItemGenProcessOpenApplication
PASS: ds = dgroup
RETURN: nothing
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 Initial version
------------------------------------------------------------------------------@
INITIAL_LMEM_HEAP_FREE_SPACE equ 10 ;will be resized bigger
INITIAL_NUMBER_OF_CHUNK_HANDLES equ 10 ;should be plenty
ItemInitializeList proc near
uses ds ;OK to push and pop ds, because
;dgroup segments are not movable
;or swapable.
.enter
;######################################################################
;FILL THIS IN
;######################################################################
.leave
ret
ItemInitializeList endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemDestroyList
DESCRIPTION: Free the global memory block that contains our list.
CALLED BY: ItemGenProcessCloseApplication
PASS: ds = dgroup
RETURN: nothing
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 Initial version
------------------------------------------------------------------------------@
ItemDestroyList proc near
.enter
;get the handle for the LMem block on the heap, and free that block
mov bx, ds:[itemListBlock]
EC < tst bx >
EC < ERROR_Z ITEM_ERROR_BLOCK_ALREADY_DESTROYED >
call MemFree
clr ds:[itemListBlock]
.leave
ret
ItemDestroyList endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemGetValue
DESCRIPTION: Get the value for the specified item in the list.
PASS: ds = dgroup
cx = item # (0 means first item in the list)
RETURN: ds, cx = same
ax = value
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 initial version
------------------------------------------------------------------------------@
ItemGetValue proc near
;######################################################################
;FILL THIS IN
mov ax, cx ;this is just a place-holder.
;You can nuke it.
;######################################################################
ret
ItemGetValue endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemSetValue
DESCRIPTION: Set the value for the specified item in the list.
PASS: ds = dgroup
cx = item # (0 means first item in the list)
ax = new value
RETURN: ds, cx = same
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 initial version
------------------------------------------------------------------------------@
ItemSetValue proc near
;######################################################################
;FILL THIS IN
;######################################################################
ret
ItemSetValue endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemInsert
DESCRIPTION: Insert an item before the specified item in the list,
and give it an initial value.
PASS: ds = dgroup
cx = item # (0 means first item in the list)
ax = initial value for item
RETURN: ds, cx = same
DESTROYED: ax
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 initial version
------------------------------------------------------------------------------@
ItemInsert proc near
uses cx, ds ;OK to push and pop ds, because
;dgroup segments are not movable
;or swapable.
.enter
;######################################################################
;FILL THIS IN
;######################################################################
.leave
ret
ItemInsert endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemDelete
DESCRIPTION: Delete the specified item in the list.
PASS: ds = dgroup
cx = item # (0 means first item in the list)
RETURN: ds, cx = same
DESTROYED: ax
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 6/92 initial version
------------------------------------------------------------------------------@
ItemDelete proc near
;######################################################################
;FILL THIS IN
;######################################################################
ret
ItemDelete endp
COMMENT @----------------------------------------------------------------------
FUNCTION: ItemFindNode
DESCRIPTION: Locates a specified node within the linked list
CALLED BY: ItemInsert, ItemDelete, ItemGetValue, ItemSetValue
PASS: es = dgroup
ds = segment of the block containing the linked list
cx = item # (0 means first item in the list)
RETURN: si = chunk handle of the specified item/node
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
? ?/92 Initial version
------------------------------------------------------------------------------@
ItemFindNode proc near
.enter
;######################################################################
;FILL THIS IN
;######################################################################
.leave
ret
ItemFindNode endp
ItemCommonCode ends ;end of CommonCode resource
| 7,783 | Assembly | asm | 24.170807 | 80 | 0.418733 | f700bdc868ad14c4c37181a3e0b7dd173a74eb5a | steakknife/pcgeos | [
"Apache-2.0"
] | 504 |
; A016793: a(n) = (3*n + 2)^5.
; 32,3125,32768,161051,537824,1419857,3200000,6436343,11881376,20511149,33554432,52521875,79235168,115856201,164916224,229345007,312500000,418195493,550731776,714924299,916132832,1160290625,1453933568,1804229351,2219006624,2706784157,3276800000,3939040643,4704270176,5584059449,6590815232,7737809375,9039207968,10510100501,12166529024,14025517307,16105100000,18424351793,21003416576,23863536599,27027081632,30517578125,34359738368,38579489651,43204003424,48261724457,53782400000,59797108943
mul $0,3
add $0,2
pow $0,5
| 550 | Assembly | asm | 78.571429 | 490 | 0.852727 | f700c338fcce6a364a251e749fb8c9fc6fc15111 | neoneye/loda-programs | [
"Apache-2.0"
] | 11 |
==================== Asm code ====================
.section .data
.align 8
.align 1
.globl abc
.type abc, @object
abc:
.quad xyz_info
| 138 | Assembly | asm | 11.5 | 50 | 0.478261 | f700cc568367a021a307baf3989a31987ce14ef0 | takenobu-hs/haskell-ghc-cmm-examples | [
"BSD-3-Clause"
] | 1 |
;
; Fast background save
;
; Generic version (just a bit slow)
;
; $Id: w_bksave.asm $
;
SECTION smc_clib
PUBLIC bksave
PUBLIC _bksave
EXTERN w_pixeladdress
.bksave
._bksave
push ix
ld hl,4
add hl,sp
ld e,(hl)
inc hl
ld d,(hl) ;sprite address
push de
pop ix
inc hl
ld e,(hl)
inc hl
ld d,(hl) ; y
inc hl
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ; x
; ld h,d ; current x coordinate
; ld l,e ; current y coordinate
ld (ix+2),l ; store x
ld (ix+3),h
ld (ix+4),e ; store y
;ld (ix+5),d
ld d,0
ld (x_coord+1),hl
ld c,e ; y coordinate
push bc
call w_pixeladdress
pop bc
ld a,(ix+0)
ld b,(ix+1)
dec a
srl a
srl a
srl a
inc a
inc a ; INT ((Xsize-1)/8+2)
ld (rbytes+1),a
.bksaves
push bc
.rbytes
ld b,0
.rloop
ld a,(de)
ld (ix+6),a
inc de
inc ix
djnz rloop
ld d,0
ld e,c
inc e ; y
.x_coord
ld hl,0
call w_pixeladdress
pop bc
inc c ; y
djnz bksaves
pop ix
ret
| 1,098 | Assembly | asm | 12.2 | 39 | 0.510018 | f700e96c771173fef1e98106a43868288c07897b | jpoikela/z88dk | [
"ClArtistic"
] | null |
; $Id: bs3-wc32-U8LS.asm 69111 2017-10-17 14:26:02Z vboxsync $
;; @file
; BS3Kit - 32-bit Watcom C/C++, 64-bit integer left shift.
;
;
; Copyright (C) 2007-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; The contents of this file may alternatively be used under the terms
; of the Common Development and Distribution License Version 1.0
; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
; VirtualBox OSE distribution, in which case the provisions of the
; CDDL are applicable instead of those of the GPL.
;
; You may elect to license modified versions of this file under the
; terms and conditions of either the GPL or the CDDL or both.
;
%include "bs3kit-template-header.mac"
;;
; 64-bit integer left shift.
;
; @returns EDX:EAX
; @param EDX:EAX Value to shift.
; @param BL Shift count (it's specified as ECX:EBX, but we only use BL).
;
global $??U8LS
$??U8LS:
global $??I8LS
$??I8LS:
push ecx ; We're allowed to trash ECX, but why bother.
mov cl, bl
and cl, 3fh
test cl, 20h
jnz .big_shift
; Shifting less than 32.
shld edx, eax, cl
shl eax, cl
.return:
pop ecx
ret
.big_shift:
; Shifting 32 or more.
mov edx, eax
shl edx, cl ; Only uses lower 5 bits.
xor eax, eax
jmp .return
| 1,878 | Assembly | asm | 29.809524 | 85 | 0.642705 | f700feff0683a2473dfad8d637ec7142ef5ec983 | Nurzamal/rest_api_docker | [
"MIT"
] | null |
; A140341: The number of bits needed to write the universal code for an Elias delta coding, the simplest asymptotically optimal code.
; Submitted by Jon Maiga
; 1,4,4,5,5,5,5,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
add $0,2
mul $0,4
sub $0,1
mov $5,-1
lpb $0
div $0,2
add $5,1
lpe
mov $0,$5
mul $0,2
mov $4,$0
lpb $0
div $0,2
add $0,1
add $1,$4
mov $2,$3
sub $2,1
add $1,$2
mov $3,4
mov $4,1
lpe
sub $1,7
mov $0,$1
div $0,2
add $0,1
| 669 | Assembly | asm | 22.3 | 270 | 0.620329 | f7012a54ccaf5a4f18748ef4aff453c3725501e1 | neoneye/loda-programs | [
"Apache-2.0"
] | 11 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 41