This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; (c) Copyright 2016 Matt Waltz | |
| ;------------------------------------------------------------------------- | |
| ; Faster memset variation | |
| ; Reasons faster: | |
| ; 1) uses ldir to memset | |
| ; 2) executes in RAM to avoid flash wait states | |
| ;------------------------------------------------------------------------- | |
| .def _memset_fast | |
| .assume adl=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include '../fasmg-ez80/ez80.inc' | |
| include '../fasmg-ez80/tiformat.inc' | |
| include '../ti84pceg.inc' | |
| format ti executable protected program 'SCROLL' | |
| ld hl,v_PrgmName+1 | |
| ld de,ti.progToEdit | |
| ld bc,8 | |
| ldir | |
| xor a,a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target triple = "i386" | |
| define i64 @test() #0 { | |
| call i64 asm "", "=v"() | |
| ret i64 %1 | |
| } | |
| attributes #0 = { "target-features"="+sse" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define time | |
| namespace time | |
| macro init | |
| ld de, 48000000/100 | |
| ld hl, ti.mpTmr1Counter | |
| ld (hl), de | |
| ld l, ti.tmr1Counter + 3 | |
| ld (hl), e | |
| inc l; ti.tmr1Load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define i1 @bittest(i4096* %i, i32 %n) { | |
| %1 = lshr i32 %n, 3 | |
| %2 = bitcast i4096* %i to i8* | |
| %3 = getelementptr i8, i8* %2, i32 %1 | |
| %4 = load i8, i8* %3 | |
| %5 = trunc i32 %n to i8 | |
| %6 = and i8 %5, 7 | |
| %7 = lshr i8 %4, %6 | |
| %8 = and i8 %7, 1 | |
| %9 = icmp ne i8 %7, 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;out off, size | |
| ;320* 0-0*2, 2 | |
| ;320* 1-1*2, 6 | |
| ;320* 2-2*2, 10 | |
| ;320* 3-3*2, 14 | |
| ;320* 4-4*2, 18 | |
| ;320* 5-5*2, 22 | |
| ;320* 6-6*2, 26 | |
| ;320* 7-7*2, 30 | |
| ;320* 8- 15, 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 006 002 | |
| 001 030 | |
| 000 013 | |
| 004 013 | |
| 005 000 | |
| 010 014 | |
| 011 001 | |
| 030 210 | |
| 030 102 | |
| 030 021 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vpath %.c src | |
| vpath %.asm src obj | |
| vpath %.obj obj | |
| CC = /home/jacob/Programming/llvm/build/Debug/bin/clang -O3 -Dreentrant= -Dinterrupt='__attribute__((__interrupt__))' -Dnested_interrupt='__attribute__((__interrupt__("nested")))' -Dnmi_interrupt='__attribute__((__interrupt__("nmi")))' -target ez80 -I/opt/CEdev/include/{,lib/{ce,std}} -mllvm -verify-machineinstrs | |
| AS = wine /opt/CEdev/bin/ez80asm.exe -NOigcase -cpu:EZ80F91 | |
| CSOURCES = $(wildcard src/*.c) | |
| ASMSOURCES = $(wildcard src/*.asm) | |
| OBJECTS = $(patsubst src/%,obj/%,$(CSOURCES:.c=.obj) $(ASMSOURCES:.asm=.obj)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| all: create $(patsubst %.src,%.obj,$(wildcard *.src)) | |
| clean: | |
| rm -f create *.src *.obj | |
| %.obj: %.src | |
| cp $< $@ | |
| create: | |
| touch create {a,b,c}.src | |
| test -e create # make sure it fails if the file wasn't created (to prevent infinite recursion)! | |
| $(MAKE) | |
| .PHONY: all clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #---------------------------- | |
| # Makefile | |
| #---------------------------- | |
| # set NAME to the name of the library | |
| # set SRC to the assembly source of the library | |
| NAME := fileioc | |
| SRC := fileioc.asm | |
| # defult locations |