Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

hey /prog/

Name: Anonymous 2012-02-10 19:21

improve my instruction set

1  - ALL -- Allocate
2  - FRE -- Free
3  - ADD -- Add
4  - SUB -- Subtract
5  - MUL -- Multiply
6  - DIV -- Divide
7  - WRT -- Write to memory
8  - MOV -- Move value
9  - SWP -- Swap values
10 - LAB -- Label
11 - GOT -- Goto
12 - CAL -- Call
13 - RET -- Return
14 - PUS -- Push stack
15 - POP -- Pop  stack
16 - MOD -- Modulo
17 - NOT -- Bitwise NOT
18 - AND -- Bitwise AND
19 - OR  -- Bitwise OR
20 - XOR -- Bitwise XOR
21 - LSH -- Left shift
22 - RLS -- Logical    Right Shift
23 - RAS -- Arithmetic Right Shift
24 - LCS -- Left  Circular Shift
25 - RCS -- Right Circular Shift
26 - CMP -- Compare two values (Binary)
27 - JMG -- Jump if the comparison register holds  1, or greater than
28 - JML -- Jump if the comparison register holds -1, or lesser than
29 - JME -- Jump if the comparison register holds  0, or equal to
30 - IRM -- Switch into indirect referencing mode
31 - DRM -- Switch into direct   referencing mode
32 - FAM -- Switch into floating arithmetic  mode
33 - IAM -- Switch into integral arithmetic  mode
34 - SPW -- Spawn a new thread
35 - WTF -- Wait for a  thread to finish executing
36 - DIE -- Kill the current thread of execution
37 - POS -- Size independant pop
38 - PEK -- Copy the first entry on the stack without removing it
39 - PKS -- Copy the first entry on the stack without removing it (Size sentisive)
40 - DUP -- Duplicated the first stack entry so that it occurs twice on the stack
41 - SSP -- Swaps the two first entries of the stack
42 - ROT -- Rotates the top of the stack
43 - PSB -- Push only the specified bytes onto the stack
44 - PPB -- Pop  only the specified bytes off  the stack
45 - ADF -- Add      floating point numbers
46 - SBF -- Subtract floating point numbers
47 - MLF -- Multiply floating point numbers
48 - DVF -- Divide   floating point numbers
49 - CMF -- Compare  floating point numbers
50 - INC -- Increment  the first stack entry (Integer)
51 - DEC -- Deccrement the first stack entry (Integer)
52 - ICF -- Increment  the first stack entry (Floating point)
53 - DCF -- Deccrement the first stack entry (Floating point)
54 - ITF -- Convert integer to floating point number
55 - FTI -- Convert float   to integer
56 - ITD -- Convert integer to double
57 - DTI -- Convert double  to integer
58 - FTD -- Convert float   to double
59 - DTF -- Convert double  to float

Name: Anonymous 2012-02-10 19:23

Why is memory allocation part of the instruction set and why is there no NOP?

p.s. DTF means down to fuck not double-to-float

Name: Anonymous 2012-02-10 19:24

60 - WTF -- Start running the program backwards

Name: Anonymous 2012-02-10 19:48

>>2
Explicit heap allocation; the way the VM handles memory in blocks makes it necessary, but I could see it becoming obsolete soon.

>>3
60 is now INT. For interrupts.

Name: Anonymous 2012-02-10 19:52

Also, 1 is EQ, 2 is GT and 4 is LT, so that bitwise cmp & 1 is true for true and false for false.

Name: Anonymous 2012-02-10 19:59

ANL and ORL for logical and/or respectively

Name: Anonymous 2012-02-10 20:18

>>6
For boolean operations? This is how it would be done as of now

push x
push y
cmp
jmg else
jml else
and_cmp_1:
push z
push i
cmp
jme do_stuff
else:


You mean something like this?

push x
push y
cmp
push %cmp
push z
push a
cmp
push %cmp
anl 2

Name: Anonymous 2012-02-10 20:20

LCK - (lock) atomic check and lock else loop (busy-wait) for mutual exclusion.
ULK - (unlock) atomic unlock for mutual exclusion.
SMP - atomic semaphore decrement, check, and push process into semaphore queue (make it happen on an architecture level? is this possible?).
SMV - atomic semaphore increment, check, and pop process into ready queue.

Name: Anonymous 2012-02-10 20:38

1  - ALL -- Allocate
2  - FRE -- Free
7  - WRT -- Write to memory
28 - JML -- Jump if the comparison register holds -1, or lesser than
34 - SPW -- Spawn a new thread
35 - WTF -- Wait for a  thread to finish executing
36 - DIE -- Kill the current thread of execution
39 - PKS -- Copy the first entry on the stack without removing it (Size sentisive)
40 - DUP -- Duplicated the first stack entry so that it occurs twice on the stack
41 - SSP -- Swaps the two first entries of the stack
42 - ROT -- Rotates the top of the stack
43 - PSB -- Push only the specified bytes onto the stack
44 - PPB -- Pop  only the specified bytes off  the stack
56 - ITD -- Convert integer to double

all those are stupid as hell
if you want to write a theoretical stack-based instruction set then at least do it right, not mixing everything into an inefficient piece of shit, stack size sensitive entries at machine level? nigga please

Name: Anonymous 2012-02-10 20:43

NOP for sure,
You should consider how exceptions (or whatever error behaviour it is you'll be using) will fit in this VM, and what instructions will be needed to support it. What will the INT instruction do?
It might be good to have instructions just to save and restore the state of the VM on the stack if external triggered interrupts are possible, using IRM, DRM, FAM, IAM in interrupt code will be hard otherwise.

Name: Anonymous 2012-02-10 20:47

ORR - because OR is the only opcode here with 2 letters
HXA - hax anus
IFQ - insert ``faggot quotes''
CSI - check security of internet
FBA - fake bugs and abort
SSV - signal segmentation violation
ANL - anal
WAM - waste all memory
PSN - push narcotics
XUS - execute user
PCS - pop caps and split

Name: Anonymous 2012-02-10 20:48

PRG - shitpost /prog/

Name: Anonymous 2012-02-10 20:51

CHK - check his dubs >>11

Name: Anonymous 2012-02-10 20:52

GJS - gas Jews and shitpost
also: Gerald Jay Sussman

Name: Anonymous 2012-02-10 20:55

WAM - waste all memory
Enters into a Warren Abstract Machine with Wikipedia preloaded as predicates.

Name: Anonymous 2012-02-10 21:00

>>11
>PSN
SNY - leak internal information about running program

Name: Anonymous 2012-02-10 21:08

>>14
Great job

>>12
That shouldn't be hard to automate

Name: Anonymous 2012-02-10 21:12

>>9
stack size sensitive entries at virtual machine level? nigga. . . That's alright

Also, by `size sensitive' what I meant was that there are two ways of popping/peeking from the stack; one way where, if the given destination is not the right size, destroy it and create a new one of the right size, or it it's not the right size, copy only as many bytes as permittable without drestroying data. Also, every stack `entry' is followed by a size_t sized integer containing its size.

Name: Anonymous 2012-02-10 21:14

>>18
s/as permittable without drestroying data./as possible. Also, not overwritre memory you don't have to/


POSSIBLE MISUNDERSTANDING RESOLVED

Name: Anonymous 2012-02-10 21:17

>>19
U\ forgot\ 2\ escape\ ur\ spaces.

Name: Anonymous 2012-02-10 21:18

>>22
nice dubs bro

Name: Anonymous 2012-02-10 21:19

RMS -- Shows RMS
HLT -- Halt
HCF -- Halt and Catch Fire
AMD -- Be
shit

Name: Anonymous 2012-02-10 21:20

>>21
Thanks Bro!

Name: Anonymous 2012-02-10 21:37

>>22
How would one go about implementing HLT in a VM?

Also, HCF rings a bell. Where have I heard that joke before?

Name: Anonymous 2012-02-10 22:03

CPP -- sepples mode
FAG -- fire a gun
BBC -- parse bbcode
JEW -- execute jew
CGC -- collect garbage collector

Name: Anonymous 2012-02-10 22:08

DUB -- Get dubs
CHK -- Check the nearest dubs
BRO -- Thank the nearest checker

Name: MOST MATURE 2012-02-10 22:11

NGR -- Nigger

Name: Anonymous 2012-02-10 22:15

GNU -- Install Gentoo

Name: Anonymous 2012-02-10 22:25

>>18
allocate and free? those are implementation dependent
write to memory? you don't say?
JML you have a whole comparison register?
all thread instructions don't make any sense, heavily kernel dependent
SSP and ROT look like the same thing but meh, might be perfectly fine

Name: Anonymous 2012-02-10 22:28

also labels and gotos? and no JMP? (since I suppose GOT = JMP) just what new information does a label bring to assembly code that an offset or absolute address doesn't?

Name: Anonymous 2012-02-10 22:30

and how'd you save that label
god how terrifying
maybe the 1b 2f method? still doesn't add anything to the architecture

Name: Anonymous 2012-02-10 22:43

>>24


One apocryphal story about the HCF instruction goes back to the late 1960s, when computers used magnetic core memory. The story goes that in order to speed up the core memory on their next model the engineers increased the read/write currents in the very fine wires that were threaded through the cores. This worked fine when the computer was executing normal programs, since memory accesses were spread throughout memory. However, the HALT instruction was implemented as a "Jump to self". This meant that the same core memory location was repeatedly accessed, and the very fine wires became so hot that they started to smoke - hence the instruction was labeled "Halt and Catch Fire".[1]

Name: Anonymous 2012-02-10 22:53

>>28
Back to /g/, [sup]please!{/sup]

Name: Anonymous 2012-02-10 23:15

PDK -- Protect Data from Corruption
JOI -- Jump On Interrupt
NMW -- [b]NIGGER MATURE[/b] Wait

Name: Anonymous 2012-02-10 23:17

>>6

Anal vs. Oral, who will win?!!!?!

GO INDIA!!

Name: Anonymous 2012-02-10 23:18

The Land of Lisp

Name: Anonymous 2012-02-10 23:25

>>29
ROT allows for rotating > 1 entries

>>30
I don't know what you think I'm trying to accomplish, but it's a bytecode based virtual machine. The labels are stored in a global linked list. Also, the assembler generates the exact same code for `goto' and `jmp'.

The actual macros (for switching over the given opcode) and the keywords used in the assembler vary slightly from the 3 letter codes given here, That was more for pretty alignment; GOT is goto (Case independant) and PUS is push, and so on.

Name: Anonymous 2012-02-10 23:48

just use MIPS

Name: Anonymous 2012-02-10 23:53

What shall the /prog/ Architecture be called?

Name: Anonymous 2012-02-11 0:16

>>39
j39

jew >>39

Name: Anonymous 2012-02-11 0:20

Cool instruction set bro, but how about you tell us:

  What their arguments are
  How they exactly operate (e.g: ADD hax anus := hax = hax + anus)
  The instruction formats
  The encoding

Name: Anonymous 2012-02-11 1:00

>>41
Arguments: Kept to a mimimum. Usually they correspond to values on the stack; add typically pops two integers off the stack then pushed the result

How they operate:
Executed by VM (e.g:
push hax
push anus
add
pop hax_anus
=
14 hax
14 anus
3
15 hax_anus
but. . . BINARIER)

Instruction formats:
lolwut

Encoding:
binary. Their correspoding numbers is their byte value in a file.

Name: Anonymous 2012-02-11 1:00

>>44
nice dubs bro

Name: Anonymous 2012-02-11 1:05

>>42
There's no hope for you

>>43
thanks bro

         _,. .--::::::::::::- .、
      .,.':::::::::::::::::::::::::::::::::::\
     .,':::::::::::,:::::::::::::::::::::::::::::::::::'.,
     /::::::::/:::::::::::::::::::::::::::::::::::::::',
    ,':::::::/::、__/............λ 、::::ヽ:::i
     i::::::,'::::::::::/-─-/ i:::/i_;::::::::i::::i   
    .i::::::::`iヽi.,.--- '、 レ' i::`イ/:::::|
   .|:::::::::/|::::i ""     '"ヽ/ヘ/::/   
   |:::::::,'::::i....i '.,   、_  ",'i:::|:;/
    |::::::::::::::',::',/へ、  __,,.イ::|:::|
   ,':::::::,- '´ヽiヽ、 ~〈ヽ;;;;::|::,'::::|  ( ::)
  ノ:::::/   ヽ、`ヽy / ヽレ'|:::::| ( ::)
  ,':::::/、.    ',/^ー:r ̄ ̄ ̄i:|
 /::::',     /    ノ、___ノ 〉
.,'::::::::i,へ/ 「 ̄ヽrー´i l   ̄iイ::|

Name: Anonymous 2012-02-11 1:19

>>44
There's no hope for you

That's no attitude to have. Don't like stacks?

Name: Anonymous 2012-02-11 6:04

>>45
It has been mathematically proven that stack machines are pretty much bullshit. You wanna go for registers wherever possible.

Name: Anonymous 2012-02-11 6:26

>>46
Mathematically proven
Provide said proof.

You wanna use registers where possible
Way ahead of you.

Name: Anonymous 2012-02-11 8:12

>>37
fine store your labels in a linked list but for what purpose, why isn't it compiled with the actual addresses or offsets and labels kept just a reminder in the linker output? unless you're making an intermediate language prior to compilation to byte code it doesn't seem useful

Name: Anonymous 2012-02-11 11:53

>>46
Bullshit. A two stack machine is a Universal Turing Machine.

Name: Anonymous 2012-02-11 11:55

>>49
And thus, you can do any operation with these two stacks.

Name: Anonymous 2012-02-11 12:46

SIO - Start I/O operation.

What good is a machine if it can't interact with any device (drives, screens, keyboards, printers, tapes, ethernet, graphics, etc.)?

Name: Anonymous 2012-02-11 12:51

>>51
You might want to google "rack server".

Name: Anonymous 2012-02-11 13:33

>>47
Provide said proof.
The absolute total proof is a bunch of statistical bullshit I pretty much pulled out of my ass just now. But this paper helps too. http://www.usenix.org/events/vee05/full_papers/p153-yunhe.pdf

>>49
Bullshit. A two stack machine is a Universal Turing Machine.
Check out that link, hotel browanda. Only pussies give a fuck about touring completeness, which you don't even need for about a million percent of certain kinds of purposes. I'm not an elected official but I know in the depths of my cold unfeeling heart that what programmers really want is that magic nexus of unfettered performance and user interface sanity that some ancient Greek dudes told all those weird stories about before they got buried under a load of volcano jizz. If you wanna lie down with them in a mesopotamian volcano grave then go for it. Meanwhile I'll be busy not giving a shit about mathematical equivalence and flying off the handle with all my totally sick codes that run way faster than yours ever would.

Name: Anonymous 2012-02-11 13:41

>>53
>Only pussies give a fuck about touring completeness

It's turing, not touring, you dumbass.

>which you don't even need for about a million percent of certain kinds of purposes.

Apparently you've never written anything more than toy programs.

Meanwhile I'll be busy not giving a shit about mathematical equivalence and flying off the handle with all my totally sick codes that run way faster than yours ever would.

Whatever. Go help another customer you mental midget you.

Name: Anonymous 2012-02-11 13:59

dubz

Name: Anonymous 2012-02-11 14:04

Check out my trips

56d => 00111000b

dem trips

Name: Anonymous 2012-02-11 14:06

>>56
you got dubs followed by double trips

nice bro

Name: Anonymous 2012-02-11 14:53

>>52
google "rack server".
U MENA "paperweight"
How will this ``rack server'' of yours send data to other machines without I/O?

Name: Anonymous 2012-02-11 15:01

59 - DTF -- Convert double  to float

Name: Anonymous 2012-02-11 15:05


21 - LSH -- Left shift
22 - RLS -- Logical    Right Shift
23 - RAS -- Arithmetic Right Shift


Great naming system.... It sucks ass.

Name: Anonymous 2012-02-11 16:02

>>60
It's still better than Intel's SHL/SHR/SAR.

Name: Anonymous 2012-02-11 16:26

>>51
That's what interrupts are for.

>>60
`The actual macros (for switching over the given opcode) and the keywords used in the assembler vary slightly from the 3 letter codes given here, That was more for pretty alignment; GOT is goto, PUS is push, and so on.'

Name: Anonymous 2012-02-11 16:46

>>61
It's still better than Intel's SHL/SHR/SAR.

SHift Left
SHift Right
Shift Arithmetic Right


makes more sense than


21 - LSH -- Left SHift
22 - RLS -- Logical    Right Shift
23 - RAS -- Arithmetic Right Shift


MIPS is even better:

SLL -- Shift Left  Logical
SRL -- Shift Right Logical
SRA -- Shift Right Arithmetic

Name: Anonymous 2012-02-11 18:20

2^6 GET

Name: Anonymous 2012-02-11 18:22

>>62
I'm suspecting you don't know what interrupts actually are.
PROTIP: ``Software interrupts'' as used by MS-DOS and early Linux was a hack until proper instructions were provided on x86.
PROTIP2: The other well known VMs don't have anything named ``interrupt''.

Name: Anonymous 2012-02-11 18:54

hey /prog/

improve my dubs

Name: Anonymous 2012-02-11 19:08

>>66
Can't

Name: Anonymous 2012-02-11 19:26

>>65
The program moves a value into %int
When the VM hits the opcode INT it checks the %int register and performs the requested action. Reminds me a little of how interrupts work in asm. Would it be better to use `request' or some shit?

Name: Anonymous 2012-02-11 20:34

hey /prog/

giggle at my post number

Name: Anonymous 2012-02-11 21:10

>>68
%int register
You obviously don't know what interrupts are.

Name: Hakurei Reimu !QbFp0CI46w 2012-02-11 21:38

Slackware-san, please post your text model of the Gensokyo mountains in this thread too!

Name: Anonymous 2012-02-12 0:42

>>71
SLACKWARESUPREMACYSLACKWARESUPREMACYSLACKWARESUPREMACY

Name: Anonymous 2013-09-01 17:11


Cardinality is studied for its own sake as part of set theory. It is also a tool used in branches of mathematics including combinatorics, abstract algebra, and mathematical analysis. In category theory, the cardinal numbers form a skeleton of the category of sets.

Name: Anonymous 2013-09-01 19:28


Elementary set theory can be studied informally and intuitively, and so can be taught in primary schools using Venn diagrams. The intuitive approach tacitly assumes that a set may be formed from the class of all objects satisfying any particular defining condition.

Don't change these.
Name: Email:
Entire Thread Thread List