Skip to content

Instantly share code, notes, and snippets.

View jscrane's full-sized avatar

Stephen Crane jscrane

View GitHub Profile
@rahmanusta
rahmanusta / spring-boot-maven-shade-plugin
Created January 30, 2015 17:06
Spring Boot and maven-shade-plugin Integration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
MEMPTR, esoteric register of the ZiLOG Z80 CPU.
by Boo-boo (first and draft English translation by Vladimir Kladov)
As it is known, after the instruction BIT n,(HL) execution, bits 3 and 5 of the flag register become containing values that is not documented in the official documentation at all. Actually these bits are copied from the bits 11 and 13 of the internal register pair of Z80 CPU, which is used for 16-bit operations, and in most cases to handle addresses. This is usual practice for processors having 8-bits data bus working with 16-bits data.
It is not known why and how these bits of the internal buffer register are copied to the flags register though. At least Sean Young in the "Undocumented Z80 Documented" refers to that phenomenon (http://www.myquest.nl/z80undocumented/) and a bit more info can be found in the Z80 description of another "nocash" project (http://www.work.de/nocash/zxdocs.htm) where such register pair is called as MEMPTR. Unfortunately until now attemts to crack the algorithm se
@bmabey
bmabey / memoize_fn.clj
Created August 10, 2011 05:00
memoized anonymous functions in clojure
; inspired from http://stackoverflow.com/questions/3906831/how-do-i-generate-memoized-recursive-functions-in-clojure
(defmacro memoize-fn
"Produces a memoized anonymous function that can recursively call itself."
[fn-name & fn-args]
`(with-local-vars
[~fn-name (memoize
(fn ~@fn-args))]
(.bindRoot ~fn-name @~fn-name)
@~fn-name))